A297706 Lexicographically earliest sequence of distinct positive terms such that for any n > 0, a(n) XOR a(n+1) XOR a(n+2) is prime (where XOR denotes the bitwise XOR operator).
1, 2, 4, 3, 5, 11, 9, 7, 12, 6, 8, 13, 14, 16, 15, 18, 10, 19, 20, 22, 17, 24, 26, 21, 28, 30, 29, 38, 36, 31, 40, 32, 23, 42, 34, 25, 44, 48, 27, 41, 33, 35, 39, 43, 37, 51, 45, 49, 53, 47, 63, 57, 59, 55, 67, 61, 69, 77, 65, 75, 73, 81, 87, 79, 91, 71, 83
Offset: 1
Examples
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
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))
Programs
-
PARI
See Links section.
Comments