OFFSET
0,3
LINKS
Iain Fox, Table of n, a(n) for n = 0..10000
FORMULA
a(0)=0, a(1)=1, a(n)=(a(n-1) AND a(n-2)) + n, where AND is the bitwise AND operator.
PROG
(Python)
prpr, prev = 0, 1
for n in range(2, 99):
. current = (prpr & prev) + n
. print prpr,
. prpr, prev = prev, current
(PARI) first(n)=my(res=vector(n, i, i-1)); for(x=3, n, res[x]=bitand(res[x-1], res[x-2])+x-1); res \\ Iain Fox, Nov 05 2018
CROSSREFS
KEYWORD
AUTHOR
Alex Ratushnyak, May 04 2012
STATUS
approved