OFFSET
1,3
FORMULA
n>1 a(2n)=a(n)+2; if n is a power of 2, a(2n+1)=1+a(2n); if n is the sum of 2 distinct power of 2, a(2n+1)=2+a(2n); a(2n+1)=a(2n) otherwise
PROG
(PARI) an[1]=1; for(n=2, 100, an[n]=sum(i=1, n-1, max(a(i)%2, a(n-i)%2)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Mar 16 2004
STATUS
approved