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
LINKS
Jonasz Aleszkiewicz, Algoritmika/primes.md.
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)))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Marco Ripà, Sep 08 2022
STATUS
approved