OFFSET
1,4
FORMULA
EXAMPLE
a(2)=2a(1)=0; a(3)=2a(1)=0; a(4)=2a(2)+3=3; a(5)=2a(2)+2=2.
PROG
(PARI) is0(n)= (n<2) || binary(n)[2]; \\ A004760
list0(nn) = select(x->is0(x), vector(nn, k, k));
list7(nn) = {my(va = vector(nn)); va[1] = 3; for (n=2, nn, va[n]= nexta(va[n-1], n); ); va; } \\ A160217
listd(nn) = {my(v7 = list7(nn), v0 = list0(nn)); vector(min(#v0-1, #v7), k, v0[k+1] - v7[k]); } \\ Michel Marcus, Dec 15 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Shevelev, May 04 2009
EXTENSIONS
Edited by N. J. A. Sloane, May 08 2009
More terms from Michel Marcus, Dec 15 2018
STATUS
approved