login
A295708
Numbers n such that prime(n) contains a substring of all the prime digits in order, i.e., "2357".
1
350, 8919, 13213, 15699, 18175, 19909, 20623, 20886, 20887, 20888, 20889, 20890, 20891, 20892, 21416, 27890, 30161, 30935, 32471, 43332, 43333, 43334, 46246, 47005, 48517, 52993, 53745, 57484, 64129, 65688, 70729, 71446, 72909, 72998, 73639, 77949, 80241, 80242
OFFSET
1,1
COMMENTS
12941584 is the least integer m with more than one "2357" substring in prime(m).
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
FORMULA
a(n) ~ n. - Charles R Greathouse IV, Dec 28 2017
EXAMPLE
8919 is in the sequence because prime(8919) = 92357 contains a substring of prime digits "2357".
27890 is in the sequence because prime(27980) = 323579 contains a substring of prime digits "2357".
MAPLE
F:= proc(d) local x, y, j;
op(map(numtheory:-pi, sort(convert(select(isprime, {seq(seq(seq(x+10^j*2357+10^(j+4)*y, y=10^(d-j-5)..10^(d-j-4)-1), x=1..10^j-1, 2), j=1..d-5),
seq(10^(d-4)*2357+x, x=1..10^(d-4)-1), seq(10^4*x+2357, x=10^(d-5)..10^(d-4)-1)}), list))));
end proc:
350, seq(F(d), d=5..7); # Robert Israel, Nov 29 2017
MATHEMATICA
Select[Range[100000], MemberQ[Partition[IntegerDigits[Prime[#]], 4, 1], {2, 3, 5, 7}] &]
PROG
(PARI) isok(n)=p = prime(n); ret = 0; while (p > 1, if ((p % 10000) == 2357, ret = 1; break); p = floor(p/10); ); return (ret); \\ Michel Marcus, Dec 15 2017
CROSSREFS
KEYWORD
nonn,base
AUTHOR
K. D. Bajpai, Nov 26 2017
STATUS
approved