A068689 Primes which are a sandwich of numbers made of only one decimal digit between two 9's.
919, 929, 9222229, 9888889, 9222222222229, 9888888888888888888888888888888888888888888888888888888888888888888888889
Offset: 1
Links
- Michel Marcus, Table of n, a(n) for n = 1..12
Programs
-
PARI
lista(nn) = my(list = List(), p); for (n=1, nn, for (k=1, 8, my(d=vector(n, i, k)); d = concat(9, d); d = concat(d, 9); if (ispseudoprime(p=fromdigits(d)), listput(list, p)););); Vec(list); \\ Michel Marcus, Jan 28 2023
-
Python
from sympy import isprime from itertools import count, islice def agen(): yield from (t for i in count(1) for m in "124578" if isprime(t:=int("9" + m*i + "9"))) print(list(islice(agen(), 11))) # Michael S. Branicky, Jan 28 2023
Extensions
More terms from Sascha Kurz, Mar 17 2002
Comments