login
A231588
Primes with decimal digits in arithmetic progression mod 10.
3
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 109, 173, 197, 307, 383, 593, 727, 739, 937, 2963, 4567, 4703, 5791, 7159, 8147, 9371, 10987, 15937, 19753, 37159, 52963, 53197, 58147, 71593, 72727, 73951, 76543
OFFSET
1,1
COMMENTS
This sequence contains straight-line primes (A167847).
a(216) has 1012 digits. - Michael S. Branicky, Aug 05 2022
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..215 (terms 1..147 from Paul Tek)
EXAMPLE
(7,2,7,2,7,...) is an arithmetic progression mod 10, hence the prime number 72727 appears in this sequence.
(7,6,5,4,3,...) is an arithmetic progression mod 10, hence the prime number 76543 appears in this sequence.
MATHEMATICA
Select[Prime[Range[PrimePi[76543]]], Length[Union[Mod[Differences[IntegerDigits[#]], 10]]] <= 1 &]
PROG
(PARI) See Link section.
(Python)
from sympy import isprime
from itertools import count, islice
def bgen():
yield from [2, 3, 5, 7]
yield from (int("".join(str((s0+i*r)%10) for i in range(d))) for d in count(2) for s0 in range(1, 10) for r in range(-s0, 10-s0))
def agen(): yield from filter(isprime, bgen())
print(list(islice(agen(), 52))) # Michael S. Branicky, Aug 05 2022
CROSSREFS
Cf. A167847.
Sequence in context: A242541 A052085 A082646 * A038618 A030475 A069676
KEYWORD
base,nonn
AUTHOR
Paul Tek, Nov 11 2013
STATUS
approved