login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A232189 Numbers k with same last four digits as p, prime(k)=p. 3

%I #28 Apr 25 2016 12:05:03

%S 9551,15103,18697,23071,24833,48229,53853,58681,83819,91617,93909,

%T 107647,115259,120487,126497,156991,160681,162857,177477,181833,

%U 189143,194229,208679,213703,221569,223047,225191,229499,252247,259379,270701,274247,276381,279919,280599

%N Numbers k with same last four digits as p, prime(k)=p.

%C k such that prime(k)-k == 0 (mod 10000). - _Robert Israel_, Jul 02 2015

%H Robert Israel, <a href="/A232189/b232189.txt">Table of n, a(n) for n = 1..607</a> (all entries with prime < 10^8)

%e 18697 and prime(18697)= 208697, both end with 8697.

%p Primes:= select(isprime, [2,seq(2*i+1, i=1..10^6)]):

%p select(t -> Primes[t]-t mod 10^4=0, [$1..nops(Primes)]); # _Robert Israel_, Jul 02 2015

%t Select[Range[1230, 300000], Mod[#, 10^4] == Mod[Prime@ #, 10^4] &]

%t (* or *)

%t Select[Range[1230, 300000], Take[IntegerDigits@ #, -4] == Take[IntegerDigits@ Prime@ #, -4] &] (* _Michael De Vlieger_, Jul 02 2015 *)

%o (PARI) {p=10007;n=1230;while(n<10^6,p=nextprime(p+1);n=n+1;if(p%10^4==n%10^4,print1(n, ", ")))}

%o (MATLAB)

%o P = primes(10^7);

%o R = mod(P - [1:size(P,2)],10000);

%o find(R==0) % _Robert Israel_, Jul 02 2015

%Y Cf. A067838, A067841, A232188.

%K nonn,base,less

%O 1,1

%A _Antonio Roldán_, Nov 20 2013

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 12:06 EDT 2024. Contains 371792 sequences. (Running on oeis4.)