login
Numbers k such that (115*10^k - 7)/9 is prime.
0

%I #17 May 11 2024 19:12:59

%S 1,2,14,26,53,86,133,206,245,323,362,872,4562,12577,14294,18425,21713,

%T 27728,87368,106772

%N Numbers k such that (115*10^k - 7)/9 is prime.

%C For k > 0, numbers k such that the digits 12 followed by k occurrences of the digit 7 is prime (see Example section).

%C a(21) > 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 127w</a>.

%e 2 is in this sequence because (115*10^2 - 7)/9 = 1277 is prime.

%e Initial terms and associated primes:

%e a(1) = 1, 127;

%e a(2) = 2, 1277;

%e a(3) = 14, 1277777777777777;

%e a(4) = 26, 1277777777777777777777777777; etc.

%t Select[Range[0, 100000], PrimeQ[(115*10^# - 7)/9] &]

%t Select[Range[87500],PrimeQ[FromDigits[PadRight[{1,2},#,7]]]&]-2 (* _Harvey P. Dale_, May 27 2018 *)

%o (PARI) isok(k) = isprime((115*10^k - 7)/9); \\ _Michel Marcus_, Nov 14 2017

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

%K nonn,more,hard

%O 1,2

%A _Robert Price_, Nov 13 2017

%E a(20) from _Robert Price_, Feb 08 2020