%I #42 Apr 03 2023 10:36:11
%S 1,14,43,507,609,2473,2624,28292,181299
%N Numbers k > 0 such that (10^(k+2) + 666)*10^k + 1 is prime.
%C Or, indices of primes in the sequence 16661, 1066601, 100666001, 10006660001,... Ondrejka calls these "beastly palindromic primes".
%C In popular culture: the number generated by a(2), 1000000000000066600000000000001, also known as Belphegor's Prime, was used as a plot device in Episode "Just a Regular Irregular" of the "Elementary" TV series (first aired Nov/13/2014). - _Serge Batalov_, Nov 15 2014
%H C. Caldwell, H. Dubner (Eds): <a href="https://t5k.org/lists/top_ten/">The top ten prime numbers: from the unpublished collections of R. Ondrejka</a> (May 2001), p. 32
%H Internet Movie Database, <a href="http://www.imdb.com/title/tt4166616">Elementary: Season 3, Episode 3: Just a Regular Irregular</a>
%H Clifford A. Pickover, <a href="http://sprott.physics.wisc.edu/pickover/pc/1000000000000066600000000000001.html">Belphegor's Prime: 1000000000000066600000000000001</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/BelphegorPrime.html">Belphegor Prime</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/IntegerSequencePrimes.html">Integer Sequence Primes</a>
%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Belphegor%27s_prime">Belphegor's prime</a>
%F a(n) = A232448(n) + 1.
%p A156166:=n->`if`(isprime((10^(n+2)+666)*10^n+1), n, NULL): seq(A156166(n), n=1..10^3); # _Wesley Ivan Hurt_, Nov 16 2014
%t Select[Range[10^3], PrimeQ[(10^(# + 2) + 666)*10^# + 1] &] (* _Arkadiusz Wesolowski_, Sep 08 2011 *)
%o (PARI) for( n=1,9999, ispseudoprime((10^(n+2)+666)*10^n+1) & print1(n","))
%o (Magma) [n: n in [1..500] | IsPrime((10^(n+2)+666)*10^n+1)]; // _Vincenzo Librandi_, Nov 15 2014
%Y Cf. A082700 and search results for 16661.
%Y Cf. A232448 (a(n) - 1).
%K more,nonn,base
%O 1,2
%A _M. F. Hasler_, Feb 10 2009
%E a(8) = 28292 (discovered on Jan 05 2004, by Daniel Heuer), _Arkadiusz Wesolowski_, Mar 16 2011
%E a(9) = 181299 from _Serge Batalov_, Nov 15 2014
|