login
Row sums of self-inverse triangle A118433.
8

%I #21 Mar 25 2024 06:38:40

%S 1,0,2,4,-4,0,-8,-16,16,0,32,64,-64,0,-128,-256,256,0,512,1024,-1024,

%T 0,-2048,-4096,4096,0,8192,16384,-16384,0,-32768,-65536,65536,0,

%U 131072,262144,-262144,0,-524288,-1048576,1048576,0,2097152,4194304,-4194304

%N Row sums of self-inverse triangle A118433.

%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,-4).

%F O.g.f.: A(x) = (1+2*x^2+4*x^3)/(1+4*x^4).

%F E.g.f.: A(x) = cos(x)*exp(-x) + sin(x)*exp(x).

%F 2*a(n) = i*(1-i)^n-i*(1+i)^n + (-1-i)^n + (-1+i)^n with i=sqrt(-1). - _R. J. Mathar_, Jan 18 2011

%p A118434 := proc(n) I*(1-I)^n-I*(1+I)^n+(-1-I)^n+(-1+I)^n ; expand(%/2) ;end proc:

%p # _R. J. Mathar_, Jan 18 2011

%t a[n_] := 2^(Floor[(n+1)/2]-3)*(-2*Mod[n, 8] + Mod[n+2 , 8] - Mod[n+3, 8] + 2*Mod[n+4, 8] - Mod[n+6, 8] + Mod[n+7, 8]); Table[a[n], {n, 0, 44}] (* _Jean-François Alcover_, May 23 2013 *)

%o (PARI) {a(n)=polcoeff((1+2*x^2+4*x^3)/(1+4*x^4+x*O(x^n)),n)}

%o (PARI) /* E.g.f.: */

%o {a(n)=local(x=X+X*O(X^n));n!*polcoeff(cos(x)*exp(-x)+sin(x)*exp(x),n,X)}

%Y Cf. A118433.

%K sign,easy

%O 0,3

%A _Paul D. Hanna_, Apr 28 2006