login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Primes p with same last three digits as k, where prime(k) = p.
3

%I #13 Dec 30 2017 12:53:46

%S 12491,14723,39119,42437,63347,69931,79817,99551,129083,135637,147647,

%T 165103,183637,190181,208697,228281,258743,263071,271787,284833,

%U 296753,297833,302173,304349,314129,340201,341287,344543,351059,357563,391163

%N Primes p with same last three digits as k, where prime(k) = p.

%H Robert Israel, <a href="/A232104/b232104.txt">Table of n, a(n) for n = 1..5839</a>

%F a(n) = prime(A067841(n)).

%e 1723, and prime(1723)= 14723, both end with 723.

%p P:= select(isprime, [2,seq(i,i=3..10^6,2)]):

%p P[select(t -> P[t]-t mod 1000 = 0, [seq(i,i=3..nops(P),2)])]; # _Robert Israel_, Oct 03 2017

%t Select[Prime[Range[34000]],Mod[#,1000]==Mod[PrimePi[#],1000]&] (* _Harvey P. Dale_, Dec 30 2017 *)

%o (PARI)

%o cutdigit(a,p,q)=(a%10^q)\10^(p-1)

%o {for(n=1,40000,p=prime(n);if(cutdigit(p,1,3)==cutdigit(n,1,3),print(p)))}

%Y Cf. A085598, A067841, A232102.

%K nonn,base

%O 1,1

%A _Antonio Roldán_, Nov 18 2013