login
Primes whose second to ninth digits are 23456789.
1

%I #23 Apr 16 2024 13:58:58

%S 623456789,1234567891,2234567891,2234567893,2234567897,3234567893,

%T 7234567891,12345678923,12345678929,12345678949,22345678907,

%U 22345678913,22345678933,22345678963,22345678967,22345678981,32345678929,32345678933,32345678951,32345678957,42345678901,42345678911,42345678937,42345678941

%N Primes whose second to ninth digits are 23456789.

%H Robert Israel, <a href="/A371865/b371865.txt">Table of n, a(n) for n = 1..10000</a>

%p R:= 623456789: count:= 1:

%p for d from 0 while count < 100 do

%p for a from 1 to 9 while count < 100 do

%p for b from 1 to 10^d-1 by 2 while count < 100 do

%p x:= b + 10^d*(23456789 + 10^8*a);

%p if isprime(x) then

%p count:= count+1; R:= R, x;

%p fi

%p od od od:

%p R;

%o (Python)

%o from itertools import count, islice

%o from sympy import primerange

%o def A371865_gen(): # generator of terms

%o for l in count(0):

%o m = 10**l

%o for a in range(1,10):

%o b = (a*10**8+23456789)*m

%o yield from primerange(b,b+m)

%o A371865_list = list(islice(A371865_gen(),20)) # _Chai Wah Wu_, Apr 09 2024

%Y Cf. A371833, A371845.

%K nonn,base,look

%O 1,1

%A _Zak Seidov_ and _Robert Israel_, Apr 09 2024

%E a(1) = 623456789 inserted by _Christian Sievers_, Apr 10 2024