OFFSET
1,1
COMMENTS
The next term a(4) contains 1017 digits, and is too large to include in data section.
LINKS
Tony Padilla and Brady Haran, The Most Evil Number, Numberphile video (2018)
EXAMPLE
a(1) = 16661 is a palindromic prime that contains the beastly number '666' and begins and ends with digit 1.
a(2) = 1000000000000066600000000000001 is palindromic prime that contains the beastly number '666' and begins and ends with digit 1.
MAPLE
MATHEMATICA
Select[Table[(1*10^(n + 2) + 666)*10^n + 1, {n, 1000}], PrimeQ]
Select[Table[FromDigits[Join[{1}, PadRight[{}, n, 0], {6, 6, 6}, PadRight[ {}, n, 0], {1}]], {n, 0, 50}], PrimeQ] (* Harvey P. Dale, Jul 09 2017 *)
PROG
(PARI) for(n=1, 500, k=((1*10^(n + 2) + 666)*10^n + 1 ); if(isprime(k), print1(k, ", ")));
(Magma) [k: n in [1..1000] | IsPrime(k) where k is ((1*10^(n + 2) + 666)*10^n + 1 )];
CROSSREFS
KEYWORD
nonn,base,less
AUTHOR
K. D. Bajpai, Jul 22 2015
STATUS
approved