login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons 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
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, 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, 46, 119, 211, 251, 211, 119, 46, 9, 1, 0, 12, 54, 166, 329, 463, 461, 331, 164, 56, 10, 1 (list; table; graph; refs; listen; history; text; internal format)
OFFSET

0,4

COMMENTS

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

LINKS

G. C. Greubel, Rows n = 0..100 of triangle, flattened

FORMULA

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

T(n,k) = (-1)^(n-k) + binomial(n,k), with T(n,n)=1. - G. C. Greubel, Nov 20 2019

EXAMPLE

First few rows of the triangle are:

  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, 36, 34, 22,  6, 1;

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

...

MAPLE

seq(seq( `if`(k=n, 1, binomial(n, k) + (-1)^(n-k)), k=0..n), n=0..12); # G. C. Greubel, Nov 20 2019

MATHEMATICA

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

Table[T[n, k], {n, 0, 12}, {k, 0, n}]//Flatten (* G. C. Greubel, Nov 20 2019 *)

PROG

(PARI) T(n, k) = if(k==n, 1, binomial(n, k) + (-1)^(n-k)); \\ G. C. Greubel, Nov 20 2019

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

[T(n, k): k in [0..n], n in [0..12]]; // G. C. Greubel, Nov 20 2019

(Sage)

def T(n, k):

    if (k==n): return 1

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

[[T(n, k) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Nov 20 2019

(GAP)

T:= function(n, k)

    if k=n then return 1;

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

    fi; end;

Flat(List([0..12], n-> List([0..n], k-> T(n, k) ))); # G. C. Greubel, Nov 20 2019

CROSSREFS

Cf. A007318, A051049.

Sequence in context: A326757 A147787 A247288 * A318686 A214546 A255704

Adjacent sequences:  A135218 A135219 A135220 * A135222 A135223 A135224

KEYWORD

nonn,tabl

AUTHOR

Gary W. Adamson, Nov 23 2007

EXTENSIONS

More terms added by G. C. Greubel, Nov 20 2019

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 25 23:18 EDT 2021. Contains 348256 sequences. (Running on oeis4.)