login
A048419
Primes whose consecutive digits differ by 7 or 8.
2
2, 3, 5, 7, 19, 29, 181, 191, 919, 929, 8081, 8191, 9181, 18181, 18191, 19181, 29191, 80819, 81919, 81929, 91807, 181919, 191929, 808081, 1918181, 8070707, 8081929, 8191819, 9192929, 18080807, 18081919, 18192929, 19180807, 19192919, 19291807
OFFSET
1,1
LINKS
MAPLE
extend:= proc(n) local d, x;
d:= n mod 10;
seq(10*n+x, x = select(t -> t >= 0 and t <= 9, [d-8, d-7, d+7, d+8]))
end proc:
R:= 2, 3, 5, 7: count:= 4:
T:= [$1..9]:
for d from 2 while count < 100 do
T:= map(extend, T);
V:= select(isprime, T);
count:= count+nops(V);
R:= R, op(V);
od:
R; # Robert Israel, Oct 17 2023
MATHEMATICA
Select[Prime[Range[13*10^5]], SubsetQ[{7, 8}, Abs[ Differences[ IntegerDigits[#]]]]&] (* Harvey P. Dale, Jan 20 2015 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Patrick De Geest, Apr 15 1999
STATUS
approved