OFFSET
1,1
COMMENTS
The first case where a(n) and a(n+1) are consecutive primes is n = 18. Thus p = a(18) = 10256839447, q = a(19) = 10256839477 and r = 10256839487 are three consecutive primes with p, q, r, p + q and q + r all pandigital. In addition, p + r = 20513678934 ia pandigital.
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000 (terms 1..100 from Robert Israel)
EXAMPLE
a(3) = 10234756849 is a term because it is prime and pandigital, the next prime 10234756859 is also pandigital, and 10234756849 + 10234756859 = 20469513708 is pandigital.
MAPLE
ispd:= proc(n) convert(convert(n, base, 10), set) = {$0..9} end proc:
q:=nextprime(10^10): qgood:= false: Res:= NULL: count:= 0:
while count < 25 do
p:= q; pgood:= qgood;
q:= nextprime(p); qgood:= ispd(q);
if pgood and qgood and ispd(p+q) then
Res:= Res, p; count:= count+1;
fi;
od:
Res;
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Robert Israel, Mar 19 2024
STATUS
approved