login
A271046
Primes p such that p and prime(p) end with the same four digits.
4
9551, 23071, 107647, 115259, 160681, 229499, 259379, 270701, 279919, 301649, 321221, 352543, 375341, 402049, 411683, 422621, 526963, 654413, 667559, 692647, 745981, 755143, 761731, 805523, 816691, 875107, 968819, 1069561, 1117603, 1143091, 1182487, 1199683
OFFSET
1,1
COMMENTS
Subsequence of A232189.
LINKS
EXAMPLE
23071 is in the sequence because 23071 % 10000 = 3071, prime(23071) = 263071 and 263071 % 10000 = 3071.
MATHEMATICA
Select[Prime@ Range[10^5], Mod[#, 10000] == Mod[Prime@ #, 10000] &] (* Michael De Vlieger, Mar 29 2016 *)
PROG
(PARI) L=List(); forprime(p=2, 1000000, if(p%10000==prime(p)%10000, listput(L, p))); Vec(L)
(Python)
from sympy import isprime, prime
for p in range(2, 10**6):
if(prime(p)%10000==p%10000 and isprime(p)):print(p)
# Soumil Mandal, Apr 04 2016
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
Colin Barker, Mar 29 2016
STATUS
approved