10 repeat
20 P=nxtprm(P)
30 inc K
40 S=S+P
50 Sstr=cutspc(str(S))
60 Good=1
70 for I=1 to int(len(Sstr)/2)
80 if mid(Sstr,I,1)<>mid(Sstr,len(Sstr)+1-I,1) then Good=0
90 next
100 if Good then print K;P;S
110 until P=0
finds before being stopped manually (each line shows k, p(k), S(k)):
1 2 2
2 3 5
8 19 77
7693 78347 285080582
8510 87641 352888253
12941 139241 854848458
146134 1959253 137372273731
637571 9564097 2939156519392
which is enough to find:
From Sloane's OEIS (A038582, A038583, A038584)
k p(k) S(k)
1 2 2
2 3 5
8 19 77
7693 78347 285080582
8510 87641 352888253
12941 139241 854848458
146134 1959253 137372273731
637571 9564097 2939156519392
27198825 516916921 6833383883833386
53205635 1048924213 27155268786255172
6283318531 155353386241 477749724515427947774
7167375533 178196630873 625179415050514971526
It would have taken quite a while for my computer to have reached this high.
|
Posted by Charlie
on 2012-04-21 14:12:08 |