login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Numbers n such that prime(n) contains a substring of all the prime digits in order, i.e., "2357".
1

%I #19 Dec 28 2017 01:59:58

%S 350,8919,13213,15699,18175,19909,20623,20886,20887,20888,20889,20890,

%T 20891,20892,21416,27890,30161,30935,32471,43332,43333,43334,46246,

%U 47005,48517,52993,53745,57484,64129,65688,70729,71446,72909,72998,73639,77949,80241,80242

%N Numbers n such that prime(n) contains a substring of all the prime digits in order, i.e., "2357".

%C 12941584 is the least integer m with more than one "2357" substring in prime(m).

%H Charles R Greathouse IV, <a href="/A295708/b295708.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) ~ n. - _Charles R Greathouse IV_, Dec 28 2017

%e 8919 is in the sequence because prime(8919) = 92357 contains a substring of prime digits "2357".

%e 27890 is in the sequence because prime(27980) = 323579 contains a substring of prime digits "2357".

%p F:= proc(d) local x,y,j;

%p 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),

%p 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))));

%p end proc:

%p 350, seq(F(d),d=5..7); # _Robert Israel_, Nov 29 2017

%t Select[Range[100000], MemberQ[Partition[IntegerDigits[Prime[#]], 4, 1], {2, 3, 5, 7}] &]

%o (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

%Y Cf. A054261, A069489, A085823.

%K nonn,base

%O 1,1

%A _K. D. Bajpai_, Nov 26 2017