[seqfan] An interesting problem

Yifan Xie xieyifan4013 at 163.com
Sun Jul 2 14:44:02 CEST 2023


Hi,
I recently discovered a problem:
For an integer n>=2, there exists a sequence {a(n)} consisting of 1, 2, 3, ... , n that for all 1<=i<=n, the sum of a(i) and a(i+1) is a prime.
Do all integers n>=2 satisfy the above condition?
The easiest algorithm to find a possible sequence is that all terms are the largest possible ones. For example, for n=5, the sequence starts with 5, since 5+4 and 5+3 are not primes, the next term is 2. Similarly, thw whole sequence is {5, 2, 3, 4, 1}.
I tested this algorithm for n<=10^4 and found that only 2108 and 7288 failed.
Can anyone help?


Cheers,
Yifan Xie (xieyifan4013 at 163.com)


More information about the SeqFan mailing list