login
Numbers k such that 10^k - 1000000001 is prime.
0

%I #27 May 31 2024 21:04:26

%S 11,18,22,26,27,36,45,59,140,162,201,278,427,563,588,757,951,2006,

%T 3938,4127,4490,5637,6074,6725,7025,10191,25628,39415,51872,57501,

%U 90227,115773,117142,148934

%N Numbers k such that 10^k - 1000000001 is prime.

%C For k > 9, numbers k such that k-10 occurrences of the digit 9 followed by the digits 8999999999 is prime (see Example section).

%C a(35) > 2*10^5.

%H Makoto Kamada, <a href="https://stdkmd.net/nrr">Factorization of near-repdigit-related numbers</a>.

%H Makoto Kamada, <a href="https://stdkmd.net/nrr/prime/prime_difficulty.txt">Search for 9w8999999999</a>.

%e 11 is in this sequence because 10^11 - 1000000001 = 98999999999 is prime.

%e Initial terms and associated primes:

%e a(1) = 11, 98999999999,

%e a(2) = 18, 999999998999999999,

%e a(3) = 22, 9999999999998999999999,

%e a(4) = 26, 99999999999999998999999999,

%e a(5) = 27, 999999999999999998999999999, etc.

%t Select[Range[0, 100000], PrimeQ[10^#-1000000001] &]

%o (PARI) is(n)=ispseudoprime(10^n-10^9-1) \\ _Charles R Greathouse IV_, Jun 08 2016

%o (Python)

%o from sympy import isprime

%o def afind(limit):

%o tenk = 10**10

%o for k in range(10, limit+1):

%o if isprime(tenk - 1000000001): print(k, end=", ")

%o tenk *= 10

%o afind(100000) # _Michael S. Branicky_, Nov 18 2021

%Y Cf. A056654, A268448, A269303, A270339, A270613, A270831, A270890, A270929, A271269.

%K nonn,more

%O 1,1

%A _Robert Price_, May 27 2016

%E a(32)-a(33) from _Robert Price_, Mar 01 2018

%E a(34) from _Robert Price_, Dec 31 2020