OFFSET
1,2
COMMENTS
Another rearrangement of natural numbers in which a(2k) is even and a(2k+1) is odd.
EXAMPLE
17 follows 14 as 14+17 =31 and 17-14 = 3 both are prime and 17 is smallest such number not occurring earlier.
MATHEMATICA
s = {m = 1}; Do[n = 2; While[MemberQ[s, n] || ! PrimeQ[n - m] || ! PrimeQ[n + m], n++]; m = n; AppendTo[s, m = n], {100}]; s (* Zak Seidov, Oct 18 2022 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, May 26 2003
EXTENSIONS
More terms from Ray Chandler, Jun 09 2003
STATUS
approved