The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A115952 Expansion of (1-x+x*y)/(1-x^2*y^2) - x^2/(1-x^2*y). 4

%I #9 Sep 08 2022 08:45:24

%S 1,-1,1,-1,0,1,0,0,-1,1,0,-1,0,0,1,0,0,0,0,-1,1,0,0,-1,0,0,0,1,0,0,0,

%T 0,0,0,-1,1,0,0,0,-1,0,0,0,0,1,0,0,0,0,0,0,0,0,-1,1,0,0,0,0,-1,0,0,0,

%U 0,0,1,0,0,0,0,0,0,0,0,0,0,-1,1,0,0,0,0,0,-1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,-1,1,0,0,0,0,0,0,-1

%N Expansion of (1-x+x*y)/(1-x^2*y^2) - x^2/(1-x^2*y).

%C Row sums are A000007. Diagonal sums are A115953. Inverse is A115954.

%H G. C. Greubel, <a href="/A115952/b115952.txt">Rows n = 0..100 of triangle, flattened</a>

%F Number triangle T(n,k)=if(n=k,1,0) OR if(n=2k+2,-1,0) OR if(n=k+1,-(1+(-1)^k)/2,0).

%e Triangle begins

%e 1,

%e -1, 1,

%e -1, 0, 1,

%e 0, 0, -1, 1,

%e 0, -1, 0, 0, 1,

%e 0, 0, 0, 0, -1, 1,

%e 0, 0, -1, 0, 0, 0, 1,

%e 0, 0, 0, 0, 0, 0, -1, 1,

%e 0, 0, 0, -1, 0, 0, 0, 0, 1,

%e 0, 0, 0, 0, 0, 0, 0, 0, -1, 1,

%e 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 1,

%e 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1,

%e 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 1,

%e 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1,

%e 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 1,

%e 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1

%t T[n_, k_]:= If[n==k, 1, If[n==k+1, -(1+(-1)^k)/2, If[n==2*k+2, -1, 0]]];

%t Table[T[n, k], {n, 0, 15}, {k, 0, n}]//Flatten (* _G. C. Greubel_, May 06 2019 *)

%o (PARI) {T(n,k) = if(n==k, 1, if(n==k+1, -(1+(-1)^k)/2, if(n==2*k+2, -1, 0)))}; \\ _G. C. Greubel_, May 06 2019

%o (Magma) [[n eq k select 1 else n eq k+1 select -(1+(-1)^k)/2 else n eq 2*(k+1) select -1 else 0: k in [0..n]]: n in [0..15]]; // _G. C. Greubel_, May 06 2019

%o (Sage)

%o def T(n, k):

%o if (n==k): return 1

%o elif (n==k+1): return -(1+(-1)^k)/2

%o elif (n==2*(k+1)): return -1

%o else: return 0

%o [[T(n, k) for k in (0..n)] for n in (0..15)] # _G. C. Greubel_, May 06 2019

%Y Cf. A115524.

%K easy,sign,tabl

%O 0,1

%A _Paul Barry_, Feb 02 2006

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 23 00:00 EDT 2024. Contains 372758 sequences. (Running on oeis4.)