login
A106105
Primes with minimal digit = 5.
2
5, 59, 557, 569, 577, 587, 599, 659, 757, 857, 859, 5557, 5569, 5657, 5659, 5669, 5689, 5779, 5857, 5867, 5869, 5879, 5897, 5987, 6569, 6577, 6599, 6659, 6857, 6959, 7559, 7577, 7589, 7757, 7759, 8597, 8599, 9587, 9857, 9859, 55579, 55589, 55667, 55697
OFFSET
1,1
LINKS
MAPLE
nextcand:= proc(n) local L, nL, Lp, i, j;
L:= convert(n, base, 10); nL:= nops(L);
if min(L) > 5 then
for i from 2 to nL do
if L[i] < 9 then
Lp:= [5$(i-1), L[i]+1, op(L[i+1..nL])];
return add(Lp[j]*10^(j-1), j=1..nL);
fi
od;
return 5*(10^(nL+1)-1)/9;
else
for i from nL to 1 by -1 do
if L[i] < 5 then
Lp:= [5$i, op(L[i+1..nL])];
return add(Lp[j]*10^(j-1), j=1..nL)
fi
od;
fi;
n
end proc;
R:= NULL: count:= 0:
x:= 0:
while count < 100 do
x:= nextcand(x+1);
if isprime(x) then R:= R, x; count:= count+1; fi;
od:
R; # Robert Israel, Nov 24 2025
MATHEMATICA
Select[Prime[Range[800]], Min[IntegerDigits[ # ]]==5&]
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Zak Seidov, May 07 2005
EXTENSIONS
More terms from Vincenzo Librandi, Apr 17 2010
STATUS
approved