

A084035


a(1) = 1 and then distinct numbers such that the sum as well the absolute difference of successive terms is a prime.


2



1, 4, 7, 10, 3, 8, 5, 2, 9, 14, 17, 6, 11, 18, 13, 16, 21, 26, 15, 22, 19, 12, 25, 28, 31, 36, 23, 20, 27, 32, 29, 24, 35, 38, 33, 40, 43, 30, 37, 34, 39, 44, 57, 46, 51, 56, 45, 52, 49, 54, 47, 42, 55, 48, 41, 60, 53, 50, 63, 68, 71, 66, 61, 78, 59, 72, 65, 62, 69, 58, 81, 70
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

Another rearrangement of natural numbers in which a(2k) is even and a(2k+1) is odd.


LINKS



EXAMPLE

17 follows 14 as 14+17 =31 and 1714 = 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



EXTENSIONS



STATUS

approved



