OFFSET
1,5
COMMENTS
This sequence has similarities with A276204: here we consider the bitwise AND operator, there the addition operator.
Apparently, the variant where we use the bitwise OR operator corresponds, up to a change of offset, to A289814.
The scatterplot of the sequence has fractal features (see illustrations in Links section).
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)
EXAMPLE
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.
PROG
(C++) See Links section.
CROSSREFS
KEYWORD
AUTHOR
Rémy Sigrist, Aug 07 2018
STATUS
approved