|
|
A182508
|
|
a(0)=0, a(1)=1, a(n) = (a(n-2)+a(n-1)+n) AND n.
|
|
0
|
|
|
0, 1, 2, 2, 0, 5, 2, 6, 0, 9, 2, 2, 0, 13, 10, 6, 0, 17, 2, 2, 16, 5, 2, 22, 16, 25, 2, 18, 16, 29, 10, 6, 32, 1, 2, 34, 0, 5, 34, 6, 0, 41, 2, 2, 32, 13, 10, 6, 0, 49, 34, 2, 16, 5, 2, 54, 48, 25, 2, 18, 16, 29, 42, 6, 64, 1, 2, 66, 0, 5, 66, 6
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
Terms with indices 4*k+1 are odd, all other terms are even.
Conjecture: sequence contains infinitely many zeros and ones, but no terms of the form 2^k-1, k>1.
|
|
LINKS
|
|
|
FORMULA
|
a(0)=0, a(1)=1, a(n) = (a(n-2)+a(n-1)+n) AND n, where AND is the bitwise AND operator.
|
|
MATHEMATICA
|
nxt[{n_, a_, b_}]:={n+1, b, BitAnd[a+b+n+1, n+1]}; NestList[nxt, {1, 0, 1}, 80][[All, 2]] (* Harvey P. Dale, Nov 19 2021 *)
|
|
PROG
|
(Python)
prpr = 0
prev = 1
for n in range(2, 99):
current = (prpr + prev + n) & n
print prpr,
prpr = prev
prev = current
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|