OFFSET
1,2
LINKS
Ivan Neretin, Table of n, a(n) for n = 1..10000
MAPLE
M:=100;
v[1]:=1; v[2]:=2; w[1]:=0; w[2]:=1; x[1]:=1; x[2]:=1;
for n from 3 to M do
v[n]:=v[n-1-w[n-1]]+v[n-1-x[n-1]];
if v[n] mod 2 = 0 then w[n]:=w[n-1]+1; x[n]:=x[n-1];
else w[n]:=w[n-1]; x[n]:=x[n-1]+1; fi;
od:
[seq(v[n], n=1..M)]; # A249036
[seq(w[n], n=1..M)]; # A249037
[seq(x[n], n=1..M)]; # A249038
MATHEMATICA
Nest[Append[#, #[[Length@Select[#, OddQ]]] + #[[Length@Select[#, EvenQ]]]] &, {1, 2}, 75] (* Ivan Neretin, May 02 2016 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Oct 26 2014
STATUS
approved