login
Primes p of the form n + 987654321 where 987654321 is the largest zeroless pandigital number.
5

%I #12 Apr 19 2014 17:28:07

%S 987654323,987654337,987654347,987654359,987654361,987654377,

%T 987654379,987654383,987654419,987654439,987654443,987654461,

%U 987654463,987654467,987654511,987654539,987654581,987654583,987654601,987654607,987654611,987654673,987654677,987654791

%N Primes p of the form n + 987654321 where 987654321 is the largest zeroless pandigital number.

%H K. D. Bajpai, <a href="/A234812/b234812.txt">Table of n, a(n) for n = 1..9777</a>

%e 987654323 is a prime and appears in the sequence because 987654323 = 2 + 987654321.

%e 987654337 is a prime and appears in the sequence because 987654337 = 16 + 987654321.

%p KD := proc() local a; a:=n+987654321; if isprime(a) then RETURN (a); fi; end: seq(KD(), n=1..1000);

%t Select[Table[k + 987654321, {k,1,1000}], PrimeQ]

%t c=0; a=n+987654321; Do[If[PrimeQ[a], c=c+1; Print[c," ",a]], {n,0,200000}] (* b-file *)

%Y Cf. A000040, A002496, A028871, A050289, A056899, A240587.

%K nonn,base

%O 1,1

%A _K. D. Bajpai_, Apr 19 2014