Right-truncatable Primes in Various Bases

Start here for terminology.

Here is a plot of the number of rtp's for each base, based upon the table below, and two functions which seem to bound above and below. Also in the table is the number of rtp leaders (leaf nodes, numbers with no children), the ratio of leaders, and the number of digits of the largest rtp in that base. The ratio of rtp's which are leaders can be seen to be roughly constant, independent of the base (~1/2.74). If you follow the links for each base, a complete record of how many rtps and leaders were found with each number of digits fan be found.

basetallyleadersleader ratiodigitsmost common length
reality / predicted
3410.2500041 of length 12.73
4720.2857142 of length 12.89
51440.2857154 of length 23.11
636110.3055679 of length 53.35
71970.3684256 of length 33.60
868200.29412816 of length 43.85
968230.338241014 of length 44.10
1083270.32530816 of length 44.34
1189280.314611020 of length 44.59
12179610.340781034 of length 44.83
13176610.346591028 of length 45.07
144391530.348521774 of length 55.30
153731300.348531374 of length 65.54
164141510.364731477 of length 65.77
174731570.331921879 of length 56.00
188393010.3587615129 of length 56.23
1910103430.3396015165 of length 66.45
2015775610.3557417242 of length 76.68
2122718060.3549118343 of length 76.90
22284810460.3672820426 of length 77.12
2317626150.3490415260 of length 67.34
24337612270.3634524508 of length 87.55
25591321360.3612418836 of length 87.77
26679524720.3638019959 of length 87.98
27635222880.3602021921 of length 88.19
281031936850.35711211420 of length 88.40
29586621100.3597022833 of length 88.61
301463952410.35802221976 of length 98.82
311330347980.36067221800 of length 99.03
321943970170.36098232594 of length 99.23
3329982106300.35455233874 of length 99.44
3438956141750.36387254891 of length 109.64
3539323141270.35926245164 of length 109.84
3658857212670.36133247304 of length 1010.05
3741646150340.36100265291 of length 1010.25
3868371246770.36093278479 of length 1010.45
3980754292890.36269279971 of length 1010.65
40128859468140.363302915646 of length 1110.84
4181453292910.359612610084 of length 1011.04
42175734638720.363462920909 of length 1111.24
43161438584510.362063019522 of length 1111.43
44228543828390.362472727028 of length 1111.63
453962741436780.362573145758 of length 1211.82
465387971960330.363833161124 of length 1212.01
47273372991030.362522832102 of length 1112.21
486008942181080.362973268242 of length 1212.40
496131532225100.362893270087 of length 1212.59
508517763097950.363703394870 of length 1312.78
5112078194381200.3627435133850 of length 1312.97
5214090695125320.3637436155347 of length 1313.16
538822923205700.363343198582 of length 1313.35
5418225006623530.3634336197583 of length 1313.54
55395775714367910.3630338418106 of length 1413.72
56310873611293230.3632737331798 of length 1413.91
57357816113021480.3639236379556 of length 1414.10
58468437217065860.3643137487922 of length 1414.28
5925209869165640.3635735270139 of length 1414.47
60595374221650440.3636438618382 of length 1514.65
61552448620101490.3638638577934 of length 1414.84
62863741031424260.3638240890724 of length 1515.02
631302136847410750.36410391328458 of length 1515.21
641421654551799620.36436411439695 of length 1515.39
651396613350802510.36376411411924 of length 1515.57
661997748072700520.36391401999328 of length 1615.75
671505358354790160.36397421520900 of length 1515.93
682479876090423060.36463402478999 of length 1616.12
6929483567107438120.36440432929014 of length 1616.30
7041014886149306090.36403443992044 of length 1716.48
7128523639103871120.36416422836554 of length 1616.66
7257176196208478370.36462475551985 of length 1716.84
7349841056181676700.36451434851762 of length 1717.01
7476776947279951740.36463437417688 of length 1717.19
75118408046431943840.364794711258834 of length 1717.37
76133210381486025310.364864612594279 of length 1817.55
77117085262427153110.364824611121039 of length 1717.73
78159081762580993530.365224715012447 of length 1817.90
79136343482497186790.364664512897770 of length 1818.08
80231196364843863100.365004621706360 of length 1818.26
813062023121117235700.364874728350090 of length 1818.43
824321326181576904950.364915039722251 of length 1918.61
83227653799830520160.364824621366470 of length 1818.78
844725503851725349840.365114943380865 of length 1918.96
8510559042093850199810.364645394678873 of length 2019.13
867510590722740774560.364924968147522 of length 1919.31
878320468773037760610.365095375107844 of length 1919.48
8811793504324306605360.3651752105599217 of length 2019.65
896436121772349187230.365005058700485 of length 1919.83
9013733144105015547600.3652151122775516 of length 2020.00

Using this rather inefficient GP script, you can find right-truncatable primes in arbitrary bases:

rtp(base)={
  local(pd=vector(eulerphi(base)),pdl=length(pd),fl=0,bl=[],sp=0,j,k);
  j=0;for(i=1,base-1,if(gcd(i,base)==1,j++;pd[j]=i));
  forprime(p=2,base-1,fl++;bl=concat(bl,[p]));
  while(length(bl)>0,
    nb=[];
    for(i=1,length(bl),
      p=bl[i]*base;
      k=0;
      for(j=1,pdl,if(ispseudoprime(p+pd[j]),k++;nb=concat(nb,[p+pd[j]])));
      fl+=k;sp+=!k
    );
    bl=nb
  );
  [fl,sp]
}
It finds them in increasing order of number of digits, which makes it very inefficient memory wise.


Another hastily constructed page by Phil Carmody
Home / Maths / index.html