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!)
A135221 Triangle A007318 + A000012(signed) - I, I = Identity matrix, read by rows. 2

%I #9 Mar 27 2022 18:26:14

%S 1,0,1,2,1,1,0,4,2,1,2,3,7,3,1,0,6,9,11,4,1,2,5,16,19,16,5,1,0,8,20,

%T 36,34,22,6,1,2,7,29,55,71,55,29,7,1,0,10,35,85,125,127,83,37,8,1,2,9,

%U 46,119,211,251,211,119,46,9,1,0,12,54,166,329,463,461,331,164,56,10,1

%N Triangle A007318 + A000012(signed) - I, I = Identity matrix, read by rows.

%C row sums = A051049: (1, 1, 4, 7, 16, 31, 64, ...).

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

%F T(n,k) = A007318 + A000012(signed) - Identity matrix, where A000012(signed) = (1; -1,1; 1,-1,1; ...).

%F T(n,k) = (-1)^(n-k) + binomial(n,k), with T(n,n)=1. - _G. C. Greubel_, Nov 20 2019

%e First few rows of the triangle:

%e 1;

%e 0, 1;

%e 2, 1, 1;

%e 0, 4, 2, 1;

%e 2, 3, 7, 3, 1;

%e 0, 6, 9, 11, 4, 1;

%e 2, 5, 16, 19, 16, 5, 1;

%e 0, 8, 20, 36, 34, 22, 6, 1;

%e 2, 7, 29, 55, 71, 55, 29, 7, 1;

%e ...

%p seq(seq( `if`(k=n, 1, binomial(n,k) + (-1)^(n-k)), k=0..n), n=0..12); # _G. C. Greubel_, Nov 20 2019

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

%t Table[T[n, k], {n, 0, 12}, {k, 0, n}]//Flatten (* _G. C. Greubel_, Nov 20 2019 *)

%o (PARI) T(n,k) = if(k==n, 1, binomial(n,k) + (-1)^(n-k)); \\ _G. C. Greubel_, Nov 20 2019

%o (Magma) T:= func< n,k | k eq n select 1 else Binomial(n,k) +(-1)^(n-k) >;

%o [T(n,k): k in [0..n], n in [0..12]]; // _G. C. Greubel_, Nov 20 2019

%o (Sage)

%o def T(n, k):

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

%o else: return binomial(n,k) + (-1)^(n-k)

%o [[T(n, k) for k in (0..n)] for n in (0..12)] # _G. C. Greubel_, Nov 20 2019

%o (GAP)

%o T:= function(n,k)

%o if k=n then return 1;

%o else return Binomial(n,k) + (-1)^(n-k);

%o fi; end;

%o Flat(List([0..12], n-> List([0..n], k-> T(n,k) ))); # _G. C. Greubel_, Nov 20 2019

%Y Cf. A007318, A051049.

%K nonn,tabl

%O 0,4

%A _Gary W. Adamson_, Nov 23 2007

%E More terms added by _G. C. Greubel_, Nov 20 2019

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 April 19 23:40 EDT 2024. Contains 371798 sequences. (Running on oeis4.)