login
A356987
Primes whose decimal expansion is 1, zero or more 0's, then a single digit.
0
11, 13, 17, 19, 101, 103, 107, 109, 1009, 10007, 10009, 100003, 1000003, 100000007, 1000000007, 1000000009, 100000000003, 100000000000000003, 1000000000000000003, 1000000000000000009, 10000000000000000000009, 1000000000000000000000007
OFFSET
1,1
COMMENTS
The sequence is a subsequence of A139054.
All the terms of this sequence are of the form 10^k + m, where m belongs to the set {1, 3, 7, 9} and k is a nonnegative integer.
If a term is of the form 10^k+m and k is odd, then m > 1. - Chai Wah Wu, Oct 22 2022
EXAMPLE
1000000007 is a term because it is a prime number whose decimal expansion is 1, 8 zeros, then the single digit 7.
MATHEMATICA
PrmsUpTo10PowNpl9[n_] := Parallelize @ Cases[ Table[10^k+m, {k, n}, {m, {1, 3, 7, 9}}], _?PrimeQ, {2}]; PrmsUpTo10PowNpl9[1000] (* Mikk Heidemaa, Jan 07 2023 *)
PROG
(Python)
from itertools import count, islice
from sympy import isprime
def A356987_gen(): # generator of terms
return filter(isprime, (10**k+m for k in count(1) for m in (1, 3, 7, 9)))
A356987_list = print(list(islice(A356987_gen(), 30))) # Chai Wah Wu, Oct 22 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Marco Ripà, Sep 08 2022
STATUS
approved