OFFSET
1,1
EXAMPLE
a(3) = 251 because the 4 primes starting with 251 are 251, 257, 263, 269, and 251, 257 and 263 are in A354589 but 269 is not; and 251 is the least prime for which this works.
MAPLE
P:= select(isprime, [seq(i, i=1..10^7, 2)]):
nP:= nops(P);
P10:= P mod 10:
s:= 0: V:= Vector(10):
for i from 1 to nP-3 do
if convert(P10[i..i+3], set) = {1, 3, 7, 9} then s:= s+1
else
if s > 0 and s <= 10 and V[s] = 0 then V[s]:= P[i-s] fi;
s:= 0
fi
od:
convert(V, list);
CROSSREFS
KEYWORD
nonn,more,base
AUTHOR
J. M. Bergot and Robert Israel, Aug 18 2022
EXTENSIONS
a(11)-a(14) from Michael S. Branicky, Aug 18 2022
a(15)-a(17) from Michael S. Branicky, Aug 20 2022
STATUS
approved