Consider the following list of integers:
P0 =41, P1 =43, P2 =47, P3 =53,…,
in which Pn is obtained by adding 2n to Pn−1. It so happens that there is a quadratic function F(x) with the property that Pn = F(n) for all non-negative n. Find F.
Once you have F, consider this question: Is F(n) a prime number for every non-negative value of n?
Solution
The trick is to rewrite each integer in terms of the first value (41) and look for a pattern that resembles a quadratic function:
P0 P1 P2 P3 P4 =====4143475361=====…41+041+241+641+1241+20=====41+041+12 +141+22 +241+32 +341+42 +4
Thus,
Pn=41+n2+n=n2+n+41.
Although the instances we're seeing are all prime, when we reach n =41,
P41 =412 +41+41=41(41+2)=41⋅43,
the result is not prime.
This sequence is famous because for a sequence with a simple formula it generates primes for a long time. It was Euler (in 1772) who first noticed it.