Apocalypse Number

Author

Eric W. Weisstein
November 10, 2004

This notebook downloaded from http://mathworld.wolfram.com/notebooks/Numbers/ApocalypseNumber.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/ApocalypseNumber.html.

©2005 Wolfram Research, Inc. except for portions noted otherwise

Fibonacci

Ceiling[n/.FindRoot[Log[10,FunctionExpand[Fibonacci[n]]]+1==666,{n,10}]]

Length[IntegerDigits[Fibonacci[#]]]&/@Range[3183,3185]

Apocalypse Prime

(primes=Position[10^665+Range[2 10^5],_?PrimeQ]//Flatten)//Timing

primes={123,1837,6409,7329,8569,8967,9663,13213,14943,16299,17053,17857,22611,24601,25261,25729,27847,30567,32413,33321,33379,34257,34557,34723,38097,39387,39787,39889,39973,43501,43719,44889,48139,49587,53683,53689,54339,56487,57951,58161,58419,58777,63291,66223,66319,67017,68067,68629,71173,72273,73003,74143,74331,74571,76039,78327,78481,86317,89797,94669,96831,97009,98241,98637,100909,100953,101881,101997,104641,107799,109329,118227,122517,124561,124929,125697,126397,126879,127093,130491,130887,132657,134343,140631,140727,140743,140829,141103,141177,143079,145359,148333,150951,153733,154333,155889,156777,157701,158527,159723,161511,162813,164133,164533,165597,166657,168063,169239,169651,170059,170761,171069,172201,173041,175267,175441,176121,176239,177003,178623,180243,180963,182077,183141,188823,190819,191527,191667,192063,192489,193441,193609,196129};

Block[{$MaxExtraPrecision=10^4},Digits[10^665+#]&/@primes
]//Union

Timing[Union[PrimeQ/@(10^665+primes)]]

Containing 666

Select[primes,MatchQ[IntegerDigits[#],{___,6,6,6,___}]&]