OU blog

Personal Blogs

Richard Walker

An Evil Prime — Belphegor's Prime Contains 666 The Number Of The Beast

Visible to anyone in the world
Edited by Richard Walker, Wednesday 16 September 2026 at 23:07

You may not have met this remarkable palindromic number before.

1000000000000066600000000000001 equals 10 super 30 plus 666 multiplication 10 super 14 plus one

is a prime. Because it contains 666 , the Number of the Beast, this prime is nicknamed Belphegor's prime, after one of the Seven Princes of Hell. Here he is

250px-Belphegor.jpg?utm_source=commons.wikimedia.org&utm_campaign=index&utm_content=thumbnail

This prime was discovered by Harvey Dubner, an expert in finding large unusual primes, and is one of a sequence which you can find on the Online Encyclopedia of Integer Sequences (OEIS) here. The next is 

100000000000000000000000000000000000000000066600000000000000000000 times 00000000000000000000001

The OEIS seems to suggest this is only a 'probable' prime. A probable prime is a number that has passed a long series of tests from which we can conclude the probability it is not prime is very small. We also have exact tests but they are much slower, because they involve much longer calculations. In this case I found that according to SageMathCell, which I think uses an exact test, this is a definite prime, not just a probable one.

The next number after that would be a probable prime with more than ten times as many digits, so I won't try to display it here or prove it is a definite prime.

How did Dubner discover Belphegor's prime? Purely guessing but maybe he spotted the 16661 is prime and thought that was neat, so he then tried inserting more zeros and putting the numbers so formed to a probabilistic primality test until he struck gold with thirteen zeros each side of the evil 666 .

I haven't really investigated but I thought interesting palindromic primes might not be all that rare. If there are seven demons in hell, what if we change 666 to 777 in recognition of the fact. Is 

1000000000000077700000000000001

prime? Can we prove it? YES WE CAN! How spooky is that?

I hereby name it the Seven Demons Prime.

Picture credit http://en.wikipedia.org/wiki/File:Belphegor.gif, public domain.

Permalink
Share post

This blog might contain posts that are only visible to logged-in users, or where only logged-in users can comment. If you have an account on the system, please log in for full access.

Total visits to this blog: 6534609