There Is An Infinite Series … But I Bet You Can’t Get The Next In This Sequence … 1, 5, 13, 563 …

I will give you £100 if you can find the next value in the sequence of 1, 5, 13, 563 …

There Is An Infinite Series … But I Bet You Can’t Get The Next In This Sequence … 1, 5, 13, 563 …

I will give you £100 if you can find the next value in the sequence of 1, 5, 13, 563 …

I can assure you that this is an infinite series and that the next value exists, but you will not have enough energy on the planet to compute the next value.

Prime numbers are used extensively in public-key encryption and have been studied for centuries. One person who studied them was John Wilson, and in 1770, he defined that a prime number was defined that a prime number can be tested with:

(n+1)! mod(n)=-1

If we try this in Python we get:

>>> import math
>>> n=11
>>> print (math.factorial(n-1) % n) -n
-1
>>> n=10
>>> print (math.factorial(n-1) % n) -n
-10
>>> n=13
>>> print (math.factorial(n-1) % n) -n
-1

A Wilson prime is computed with:

If we try a Python program for this we have:

import math
for x in range(1,1000):
rtn= (math.factorial(x-1)+1) % (x*x)
if (rtn==0): print (x)

When we run a sample run we get:

1 5 13 563

Unfortunately, if we keep trying we will not another one until after 20,000,000,000,000 [link]. But it has been proposed that there is an infinite number of values in the sequence [link]. If you want to search for the next one, you’ll need more energy than it takes to boil all the seas on the planet.