OFFSET
1,2
COMMENTS
See A297879 for the corresponding prime numbers.
This sequence has connections with A076990: here we combine triples of successive terms with the XOR operator, there with the usual addition operator.
The sequence alternates long runs of odd terms and long runs with periodic parity (even, even, odd); changes from one type of run to the other occur near terms such that a(n) XOR a(n+1) XOR a(n+2) = 2; see illustration in Links section.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
Rémy Sigrist, PARI program for A297706
Rémy Sigrist, Colored scatterplot of the first 25000 terms (where the color is function of the parity of a(n))
EXAMPLE
The first terms of the sequence are:
n a(n) a(n) XOR a(n+1) XOR a(n+2)
-- ---- --------------------------
1 1 7
2 2 5
3 4 2
4 3 13
5 5 7
6 11 5
7 9 2
8 7 13
9 12 2
10 6 3
11 8 11
12 13 19
13 14 17
14 16 13
15 15 23
16 18 11
17 10 13
18 19 17
19 20 19
20 22 31
PROG
(PARI) See Links section.
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Jan 03 2018
STATUS
approved