%I #14 Jun 02 2024 20:58:45
%S 1,2,17,34,52,54,495,505,572,750,959,1574,2557,3734,4069,11201,13411,
%T 16569,17032,17720,19906,23781,36076,56624,84179,117249,159147
%N Numbers k such that (13*10^k + 161)/3 is prime.
%C For k > 1, numbers k such that the digit 4 followed by k-2 occurrences of the digit 3 followed by the digits 87 is prime (see Example section).
%C a(28) > 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 43w87</a>.
%e 4 is in this sequence because (13*10^2 + 161)/3 = 487 is prime.
%e Initial terms and associated primes:
%e a(1) = 1, 97;
%e a(2) = 2, 487;
%e a(3) = 17, 433333333333333387;
%e a(4) = 34, 43333333333333333333333333333333387;
%e a(5) = 52, 43333333333333333333333333333333333333333333333333387; etc.
%t Select[Range[0, 100000], PrimeQ[(13*10^# + 161)/3] &]
%o (PARI) isok(n) = isprime((13*10^n + 161)/3); \\ _Indranil Ghosh_, Apr 02 2017
%Y Cf. A056654, A268448, A269303, A270339, A270613, A270831, A270890, A270929, A271269.
%K nonn,more,hard
%O 1,2
%A _Robert Price_, Apr 02 2017
%E a(26)-a(27) from _Robert Price_, Nov 29 2018