OFFSET
0,9
COMMENTS
Self-similar or fractal sequence (underlining every second or fourth term, reproduce the original sequence).
LINKS
Michael Gilleland, Some Self-Similar Integer Sequences
FORMULA
EXAMPLE
a(0) = 0;
a(1) = a(2*0+1) = a(0) = 0;
a(2) = a(2*1) = floor(1/2) = 0,
a(3) = a(2*1+1) = a(1) = 0;
a(4) = a(2*2) = floor(2/2) = 1;
a(5) = a(2*2+1) = a(2) = 0;
a(6) = a(2*3) = floor(3/2) = 1, etc.
...........................................
a(n) = 0, 0, 0, 0, 1, 0, 1, 0, 2, 1, ...
a(2n+1) = 0, 0, 0, 0, 1, 0, 1, 0, 2, 1, ...
a(4n+3) = 0, 0, 0, 0, 1, 0, 1, 0, 2, 1, ...
a(2n) = 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, ...
a(4n+1) = 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, ...
a(4n) = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ...
a(4n+2) = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ...
...........................................
MATHEMATICA
Table[BitShiftRight[n, IntegerExponent[n, 2] + 2], {n, 100}]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Ilya Gutkovskiy, Jun 29 2016
STATUS
approved