%I #10 Oct 17 2023 18:21:29
%S 2,3,5,7,37,41,47,59,73,151,251,263,269,373,859,3037,3041,3637,4159,
%T 5147,5851,6263,6269,6373,6959,7369,14159,14737,14741,14747,14851,
%U 15259,15263,15269,15859,15959,25147,25841,25847,25951,25969,26251
%N Primes whose consecutive digits differ by 3 or 4.
%H Robert Israel, <a href="/A048415/b048415.txt">Table of n, a(n) for n = 1..10000</a>
%p extend:= proc(n) local d,x;
%p d:= n mod 10;
%p seq(10*n+x, x = select(t -> t >= 0 and t <= 9, [d-4,d-3,d+3,d+4]))
%p end proc:
%p R:= 2,3,5,7: count:= 4:
%p T:= [$1..9]:
%p for d from 2 while count < 100 do
%p T:= map(extend,T);
%p V:= select(isprime,T);
%p count:= count+nops(V);
%p R:= R, op(V);
%p od:
%p R; # _Robert Israel_, Oct 17 2023
%Y Cf. A048413-A048420.
%K nonn,base
%O 1,1
%A _Patrick De Geest_, Apr 15 1999