login
A108842
Palindromic primes in which all internal digits are 5.
8
151, 353, 757, 15551, 75557, 355555553, 75555555557, 155555555555555555551, 755555555555555555557, 75555555555555555555557, 155555555555555555555555555555551, 75555555555555555555555555555555555555555555555555555555557
OFFSET
1,1
COMMENTS
The next term -- a(13) -- has 75 digits. - Harvey P. Dale, May 18 2015
a(25) has 1975 digits. - Michael S. Branicky, Jan 27 2023
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..24
MATHEMATICA
Select[Sort[Flatten[Table[FromDigits[Join[{n}, PadRight[{}, i, 5], {n}]], {n, {1, 3, 7, 9}}, {i, 80}]]], PrimeQ] (* Harvey P. Dale, May 18 2015 *)
PROG
(PARI) n10np1(n, d) = { local(x, y, k); for(x=1, n, for(k=1, 8, y=10^(x+1)*k+floor(10^x*d/9)*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 "1379" if isprime(t:=int(f + "5"*i + f)))
print(list(islice(agen(), 10))) # Michael S. Branicky, Jan 27 2023
CROSSREFS
Similar sequences for digit d: A108845 (d=1), A108846 (d=2), A108841 (d=4), this sequence (d=5), A108843 (d=6), A108844 (d=7), A108847 (d=8).
Sequence in context: A118494 A140022 A211551 * A078858 A217498 A078967
KEYWORD
easy,nonn,base
AUTHOR
Cino Hilliard, Jul 11 2005
EXTENSIONS
Name changed by Arkadiusz Wesolowski, Sep 07 2011
More terms from Harvey P. Dale, May 18 2015
STATUS
approved