login
Primes p such that 10p + 1, 100p + 1 and 1000p + 1 are also primes.
1

%I #8 Jun 19 2014 11:49:13

%S 7,13,19,103,823,1021,1579,1867,2503,3331,5779,6871,6949,9007,10093,

%T 10399,11317,11743,13327,13381,15859,16657,17539,17659,22189,26317,

%U 26557,26821,27397,27943,29209,29383,30211,32443,37309,38287,40213,40507,44497,47569,47977

%N Primes p such that 10p + 1, 100p + 1 and 1000p + 1 are also primes.

%H K. D. Bajpai, <a href="/A243962/b243962.txt">Table of n, a(n) for n = 1..10000</a>

%e 7 is in the sequence because 7 is prime, 10*7 + 1 = 71 is prime, 100*7 + 1 = 701 is prime, and 1000*7 + 1 = 7001 is prime.

%p with(numtheory):A243962:= proc() local p; p:=ithprime(n); if isprime(10*p+1) and isprime(100*p+1) and isprime(1000*p+1) then RETURN (p); fi; end: seq(A243962 (), n=1..5000);

%t Select[Prime[Range[10000]], PrimeQ[10 # + 1] && PrimeQ[100 # + 1] && PrimeQ[1000 # + 1] &]

%Y Cf. A000040, A023237, A024912.

%K nonn

%O 1,1

%A _K. D. Bajpai_, Jun 16 2014