Challenge 11: Sequence of Primes

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
5 replies · 4K views
Messages
5,706
Reaction score
1,592
Consider the following sequence:
a1 = p, where p is a prime number.
an+1 = 2an+1

Prove there is no value of p for which every an is a prime number, or make me look dumb and construct a counterexample.
 
Mathematics news on Phys.org
First, it follows easily by induction on n that for each n, [itex]a_n = 2^{n-1}(p+1) - 1[/itex]. By Euler's theorem [itex]2^{p-1} \equiv 1 \mod p[/itex], and so [itex]a_p = 2^{p-1}(p+1) - 1 \equiv p+1 - 1 \equiv 0 \mod p[/itex], so [itex]p \vert a_p[/itex], but [itex]p \neq a_p[/itex], so [itex]a_p[/itex] is not prime. Q.E.D.
 
This works except when p = 2 because Euler's Theorem applies only when p is relatively prime with 2. But for that case, I checked and [itex]a_6[/itex] = 95 is composite.
 
Ah yes, good catch. Thanks for patching that hole.
 
An extension. How often are the sequences prime until the pth term?
For example 3, 7, 15 is prime until term 3. 5, 11, 23, 47, 95 is prime until the term 5.
But 7 isn't prime until term 7.