A317805 Lexicographically earliest sequence of nonnegative terms such that for any n > 0 and k > 0, a(n) AND a(n + k) <> a(n + 2*k) (where AND denotes the bitwise AND operator).
0, 0, 1, 1, 2, 1, 1, 2, 2, 3, 3, 1, 3, 3, 4, 2, 4, 4, 3, 3, 5, 3, 3, 5, 2, 2, 1, 4, 4, 5, 5, 6, 5, 5, 6, 6, 3, 3, 6, 3, 3, 7, 5, 6, 7, 5, 6, 3, 7, 7, 8, 7, 8, 8, 9, 9, 7, 9, 9, 7, 7, 10, 10, 9, 9, 7, 7, 9, 10, 10, 6, 5, 10, 6, 5, 7, 11, 4, 7, 6, 7, 5, 9, 9, 11
Offset: 1
Examples
For n = 10: - a(10-2*1) AND a(10-1) = 2 AND 2 = 2, - a(10-2*2) AND a(10-2) = 1 AND 2 = 0, - a(10-2*3) AND a(10-3) = 1 AND 1 = 1, - a(10-2*4) AND a(10-4) = 0 AND 1 = 0, - hence a(10) = 3.
Links
- Rémy Sigrist, Table of n, a(n) for n = 1..10000
- Rémy Sigrist, C++ program for A317805
- Rémy Sigrist, Scatterplot of the first 9000000 terms
- Rémy Sigrist, Colored scatterplot of the first 9000000 terms (where the color is function of the greatest p such that floor(a(n)/2^p) == 1 mod 4 and n + b(a(n)) >= 2 * b(ceil(n/2^p)*2^p) and b(k) is the least m such that a(m) = k)
Comments