%I #6 Aug 07 2018 00:55:20
%S 0,1,1,2,2,3,4,5,6,7,9,10,13,14,18,19,24,25,31,32,40,41,50,51,63,64,
%T 77,78,95,96,114,115,138,139,163,164,194,195,226,227,266,267,307,308,
%U 357,358,408,409,471,472,535,536,612,613,690,691,785,786,881,882
%N G.f. A(x) satisfies A(x) = A(x^2) / (1 - x) + x / (1 - x^2).
%H G. C. Greubel, <a href="/A242634/b242634.txt">Table of n, a(n) for n = 0..2500</a>
%F G.f.: x / (1 - x) + Sum_{k>0} x^(3*2^(k-1)) / Product_{j=0..k} (1 - x^(2^j)).
%F a(n) = a(n-2) + a(floor(n/2)) unless n=1.
%F a(n) = A088585(n) - A088585(n-1) if n>=1.
%F a(n) = A088567(n) if n>0.
%F a(2*n + 1) = a(2*n) + 1 = A088585(n) if n>=0.
%e G.f. = x + x^2 + 2*x^3 + 2*x^4 + 3*x^5 + 4*x^6 + 5*x^7 + 6*x^8 + 7*x^9 + ...
%t a[ n_] := If[ n < 0, 0, Module[{A = 0}, Do[A = (x + (1 + x) (A /. x -> x^2)) / (1 - x^2), {IntegerLength[ n, 2]}]; SeriesCoefficient[ A, {x, 0, n}]]];
%o (PARI) {a(n) = my(A = O(x)); if( n<0, 0, for(k=1, #binary(n), A = (x + (1 + x) * subst(A, x, x^2)) / (1 - x^2)); polcoeff(A, n))};
%o (PARI) {a(n) = if( n<0, 0, polcoeff( sum(k=0, #binary(n\3), x^(2^k*3 \ 2) / prod(j=0, k, 1 - x^2^j), x * O(x^n)), n))};
%Y Cf. A088567, A088585.
%K nonn
%O 0,4
%A _Michael Somos_, May 19 2014
|