%I #18 Mar 19 2023 02:31:20
%S 1,5,17,23,25,28,91,187,287,398,899,1364,2921,5125,5890,8780,14881,
%T 35689,46669,71861,111710
%N Numbers k such that 123456789*10^k+1 is prime.
%C a(22) > 1.3*10^5. All numbers up to this bound were sieved using newpgen and sr1sieve. Remaining numbers were checked for primality using Jean Penné's LLR application (BLS (N-1/N+1) test).
%e 1 is a term because 1234567891 is prime.
%e 2 is not a term because 12345678901 is composite (it is divisible by 857).
%t Select[Range@ 1400, PrimeQ[123456789*10^# + 1] &] (* _Michael De Vlieger_, Jan 04 2019 *)
%o (Python)
%o from sympy.ntheory.primetest import isprime
%o for n in range(1,1000):
%o if isprime(123456789*10**n+1):
%o print(n, end=', ') # _Stefano Spezia_, Jan 05 2019
%Y Cf. A248349, A248350, A321806.
%K nonn,more
%O 1,2
%A _Matthias Baur_, Jan 01 2019
|