|
|
A108848
|
|
Palindromic primes in which all internal digits are 9.
|
|
5
|
|
|
191, 797, 19991, 79997, 199999991, 79999999999999999999999999997, 19999999999999999999999999999999999999991, 199999999999999999999999999999999999999999999999999999999999999999999999999999999999991
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Obviously, 1 and 7 are the only possible outer digits for repeating inner digit 9.
Terms a(14), a(15), and a(16) have respectively 1213, 1285, and 1461 digits. - Harvey P. Dale, Dec 11 2019
|
|
LINKS
|
|
|
MATHEMATICA
|
Select[Flatten[Table[FromDigits[PadRight[{k}, n, 9]]*10+k, {n, 2, 200}, {k, {1, 7}}]], PrimeQ] (* Harvey P. Dale, Dec 11 2019 *)
|
|
PROG
|
(PARI) n10np9(n, d) = { local(x, y, k); for(x=1, n, for(k=1, 9, y=10^(x+1)*k+(10^x-1)*10+k; if(isprime(y), print1(y", ")) ) ) }
(Python)
from sympy import isprime
from itertools import count, islice
def agen(): yield from (t for i in count(1) for f in "17" if isprime(t:=int(f + "9"*i + f)))
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|