%I #75 Apr 01 2021 15:36:08
%S 0,13,42,506,608,2472,2623,28291,181298
%N Indices of Belphegor primes: numbers k such that the decimal number 1 0...0(k 0's) 666 0...0(k 0's) 1 (i.e., A232449(k)) is prime.
%C The resulting primes might be called Belphegor primes, after Pickover (see link). - _N. J. A. Sloane_, Dec 14 2015
%C I suspect the larger numbers only correspond to probable primes. - _N. J. A. Sloane_, Oct 16 2018
%C The numbers correspond to proven primes for n <= 9. - _Jens Kruse Andersen_, Mar 25 2021
%H Tony Padilla and Brady Haran, <a href="https://www.youtube.com/watch?v=zk_Q9y_LNzg">The Most Evil Number</a>, Numberphile video (2018)
%H Clifford A. Pickover, <a href="http://sprott.physics.wisc.edu/pickover/pc/1000000000000066600000000000001.html">Belphegor's Prime: 1000000000000066600000000000001</a>
%H Simon Singh, <a href="http://www.bbc.co.uk/news/magazine-24724635">Homer Simpson's scary math problems</a>. BBC News. Retrieved 31 October 2013.
%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) = A156166(n) - 1.
%e 0 is in the sequence because A232449(0) = 16661 is prime.
%e 13 is in the sequence because A232449(13) = 1000000000000066600000000000001 is prime.
%e For k = 1..12, A232449(k) is composite.
%e 42 is in the sequence because 10000000000000000000000000000000000000000006660000000000000000000000000000\
%e 000000000000001 is a (probable) prime. - _N. J. A. Sloane_, Oct 16 2018
%t lst = {}; Do[p = 10^(2*n + 4) + 666*10^(n + 1) + 1; If[PrimeQ[p], Print[n]], {n, 0, 3000}]; (* _Nathaniel Johnston_, Nov 25 2013 *)
%o (PARI) default(factor_proven,1);
%o Belphegor(k)=(10^(k+3)+666)*10^(k+1)+1;
%o for (an=0,10000,
%o if (isprime(Belphegor(an)),print("Found: ",an),
%o if (an%100==0,print("Tested up to: ",an)))
%o );
%Y Cf. A232449 (Belphegor numbers), A232450, A232451.
%Y Cf. A156166 (= a(n) + 1).
%K nonn,more,hard
%O 1,2
%A _Stanislav Sykora_, Nov 24 2013
%E a(9) based on A156166 from _Eric W. Weisstein_, Jan 24 2017
%E Offset changed to 1 by _Jon E. Schoenfield_, Mar 23 2021