%I #29 Nov 20 2022 01:55:51
%S 0,1,0,3,1,5,0,7,2,9,0,11,3,13,0,15,4,17,0,19,5,21,0,23,6,25,0,27,7,
%T 29,0,31,8,33,0,35,9,37,0,39,10,41,0,43,11,45,0,47,12,49,0,51,13,53,0,
%U 55,14,57,0,59,15,61,0,63,16,65,0,67,17,69,0,71,18,73,0,75,19,77,0,79,20
%N Expansion of A(x) = x*(1+3*x^2+x^3+3*x^4+x^6)/(1-x^4)^2.
%H Amiram Eldar, <a href="/A316631/b316631.txt">Table of n, a(n) for n = 0..10000</a>
%H <a href="/index/Rec#order_08">Index entries for linear recurrences with constant coefficients</a>, signature(0,0,0,2,0,0,0,-1).
%F a(n) = n/4 if n mod 4 = 0, and a(n) = 0 if n mod 4 = 2, and a(n) = n if n mod 2 = 1.
%F Linear recurrence: a(n) = 2*a(n-4) - a(n-8) for n > 7.
%F a(n) for n > 0 is multiplicative with a(2^e) = 1 - e if e < 2 and a(2^e) = 2^(e-2) if e > 1 otherwise a(p^e) = p^e for prime p > 2 and e >= 0.
%F Dirichlet g.f.: Sum_{n>0} a(n)/n^s = (1-1/2^s)^2 * zeta(s-1).
%F Dirichlet inverse b(n) for n > 0 is multiplicative with b(2^e) = 1 - e and for prime p > 2: b(p) = -p and b(p^e) = 0 if e > 1.
%F Dirichlet convolution with A104117(n) yields A000027(n).
%F Dirichlet convolution with A115364(n) yields A000203(n).
%F Sum_{k=1..n} a(k) ~ (9/32) * n^2. - _Amiram Eldar_, Nov 20 2022
%e a(22) = 0 since 22 mod 4 = 2; a(23) = 23 for 23 mod 2 = 1; a(24) = 6 because 24 mod 4 = 0 and 24/4 = 6.
%p seq(coeff(series(x*(1+3*x^2+x^3+3*x^4+x^6)/(1-x^4)^2, x,n+1),x,n),n=0..80); # _Muniru A Asiru_, Jul 20 2018
%t CoefficientList[Series[x (1 + 3 x^2 + x^3 + 3 x^4 + x^6)/(1 - x^4)^2, {x, 0, 80}], x] (* _Michael De Vlieger_, Jul 20 2018 *)
%t LinearRecurrence[{0, 0, 0, 2, 0, 0, 0, -1}, {0, 1, 0, 3, 1, 5, 0, 7}, 81] (* _Robert G. Wilson v_, Jul 21 2018 *)
%o (PARI) concat(0, Vec((x*(1+3*x^2+x^3+3*x^4+x^6)/(1-x^4)^2) + O(x^80))) \\ _Felix Fröhlich_, Jul 09 2018
%o (PARI) {my(N=79); concat([0], dirdiv(vector(N,n,n), vector(N, n, my(k=valuation(n, 2)); if(n==2^k, k+1, 0))))} \\ _Andrew Howroyd_, Jul 09 2018
%o (GAP) a:=[0,1,0,3,1,5,0,7];; for n in [9..85] do a[n]:=2*a[n-4]-a[n-8]; od; a; # _Muniru A Asiru_, Jul 20 2018
%Y Cf. A000027, A000203, A104117, A115364.
%K mult,nonn,easy
%O 0,4
%A _Werner Schulte_, Jul 09 2018