|
|
A108844
|
|
Palindromic primes in which all internal digits are 7.
|
|
9
|
|
|
373, 1777771, 377777777777773, 1777777777777777777777777777777777777777777777771, 3777777777777777777777777777777777777777777777777777773, 377777777777777777777777777777777777777777777777777777777777777777773
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
|
|
LINKS
|
|
|
MATHEMATICA
|
Union[Flatten[Table[Select[Table[FromDigits[Join[{i}, PadRight[{}, n, 7], {i}]], {n, 100}], PrimeQ], {i, 1, 9, 2}]]] (* Harvey P. Dale, Nov 22 2012 *)
|
|
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 + "7"*i + f)))
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|