login
A224906
Prime numbers p such that 10^(j-1) < p < 10^j and p + 10^(j+k) are also prime numbers for k = 0 to 4.
1
37957, 1115239, 2757649, 2884279, 3125779, 3169459, 3384583, 3405037, 4237603, 4746139, 4769239, 4861261, 5074831, 5080081, 5194951, 5295877, 5681899, 5980981, 6110593, 6330043, 7025101, 7214773, 7233883, 8010589, 8068969, 8323153, 8462131, 8653651, 9460723
OFFSET
1,1
COMMENTS
Only 656 primes have this property in the first 60000000 primes.
LINKS
EXAMPLE
37957, 137957, 1037957, 10037957, 100037957, 1000037957 are all prime numbers. Hence, a(1) = 37957 as it is the smallest prime with this property.
PROG
(PFGW & SCRIPTIFY) the file prem.txt with the 60000000 first primes
SCRIPT
DIM mm, 1
DIM n
DIM ss, 0
DIM cc
DIM pp
DIM qq
DIMS t
OPENFILEIN myf, prem.txt
OPENFILEOUT myfile, a(1).txt
LABEL a
GETNEXT qq, myf
IF qq>10^mm THEN SET mm, mm+1
SET ss, ss+1
SET cc, 1
SET n, 0
LABEL b
SET n, n+1
SET pp, qq+10^(n+mm)
SETS t, %d, %d\,; pp; cc
PRP pp, t
IF ISPRP THEN SET cc, cc+1
IF ISPRP THEN GOTO b
IF ss>59999999 THEN END
IF cc<6 THEN GOTO a
SETS t, %d, %d\,; qq; cc
WRITE myfile, t
GOTO a
CROSSREFS
Cf. A124001.
Sequence in context: A345818 A102332 A172425 * A364309 A168628 A178286
KEYWORD
nonn
AUTHOR
Pierre CAMI, Jul 25 2013
STATUS
approved