%I #47 Sep 08 2022 08:44:37
%S 0,1,2,-1,-4,1,6,-1,-8,1,10,-1,-12,1,14,-1,-16,1,18,-1,-20,1,22,-1,
%T -24,1,26,-1,-28,1,30,-1,-32,1,34,-1,-36,1,38,-1,-40,1,42,-1,-44,1,46,
%U -1,-48,1,50,-1,-52,1,54,-1,-56,1,58,-1,-60,1,62,-1,-64,1,66,-1,-68,1,70,-1,-72,1,74,-1,-76,1,78,-1,-80
%N Expansion of the e.g.f. sin(x)*(1+x).
%D Murat Sahin and Elif Tan, Conditional (strong) divisibility sequences, Fib. Q., 56 (No. 1, 2018), 18-31.
%H Antti Karttunen, <a href="/A009531/b009531.txt">Table of n, a(n) for n = 0..16384</a>
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,-2,0,-1).
%F There's an obvious formula for the n-th term!
%F G.f.: x*(1+x)^2/(1+x^2)^2.
%F abs(a(n)) = Sum_{k=0..floor((n-1)/2)} (C(n-k-1, k) mod 2)*(-1)^k*2^A000120(n-2k-1). - _Paul Barry_, Jan 06 2005
%F a(n) = (n^(n+1) mod (n+1)) * (-1)^[(n-1)/2] = a(n-1)-a(n-2)+(-1)^n*a(n-1) = -2a(n-2)-a(n-4). - _Henry Bottomley_, May 07 2005
%F a(n+2) is the Hankel transform of A086622(n+1). - _Paul Barry_, Nov 06 2007
%F E.g.f.: sin(x)*(1+x)=x*Q(0); Q(k)=1+x/(1-x/(x-2*(k+1)*(2k+3)/Q(k+1))); (continued fraction). - _Sergei N. Gladkovskii_, Nov 18 2011
%F a(n) = sin(Pi*n/2)-n*cos(Pi*n/2). - _Vaclav Kotesovec_, Oct 03 2014
%F a(n) = (((2*n+3-(-1)^n)/2)*(-1)^((2*n+5-(-1)^n)/4)+((2*n-1-(-1)^n)/2)*(-1)^((6*n+5-(-1)^n)/4))/2. - _Luce ETIENNE_, Jul 18 2015
%t CoefficientList[Series[x*(1+x)^2/(1+x^2)^2, {x, 0, 100}], x] (* _Vaclav Kotesovec_, Oct 03 2014 *)
%o (PARI) concat(0, Vec(x*(1+x)^2/(1+x^2)^2 + O(x^80))) \\ _Michel Marcus_, Oct 03 2014
%o (PARI) A009531(n) = (((n^(n+1)) % (n+1)) * ((-1)^((n-1)\2))); \\ _Antti Karttunen_, Nov 02 2017, after _Henry Bottomley_'s formula.
%o (PARI) A009531(n) = (lift(Mod(n, n+1)^(n+1)) * ((-1)^((n-1)\2))); \\ (like above, but quicker) - _Antti Karttunen_, Nov 02 2017
%o (Magma) [(((2*n+3-(-1)^n)/2)*(-1)^((2*n+5-(-1)^n) div 4)+((2*n-1-(-1)^n) div 2)*(-1)^((6*n+5-(-1)^n) div 4))/2: n in [0..90]]; // _Vincenzo Librandi_, Jul 19 2015
%Y Cf. A009001, A029578, A049240.
%K sign,easy
%O 0,3
%A _R. H. Hardin_
|