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!)
A156045 Triangle T(n, k) = 2 + n! - k! - (n-k)!, read by rows. 1
1, 1, 1, 1, 2, 1, 1, 5, 5, 1, 1, 19, 22, 19, 1, 1, 97, 114, 114, 97, 1, 1, 601, 696, 710, 696, 601, 1, 1, 4321, 4920, 5012, 5012, 4920, 4321, 1, 1, 35281, 39600, 40196, 40274, 40196, 39600, 35281, 1, 1, 322561, 357840, 362156, 362738, 362738, 362156, 357840, 322561, 1 (list; table; graph; refs; listen; history; text; internal format)
OFFSET

0,5

COMMENTS

Row sums are: {1, 2, 4, 12, 62, 424, 3306, 28508, 270430, 2810592, 31840994, ...}.

LINKS

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

FORMULA

T(n, k) = 2 + n! - k! - (n-k)!.

Sum_{k=0..n} T(n,k) = 2*(n+1) + (n+1)! - 2*!(n+1), where !n = A003422(n). - G. C. Greubel, Dec 02 2019

EXAMPLE

Triangle begins as:

  1;

  1,     1;

  1,     2,     1;

  1,     5,     5,     1;

  1,    19,    22,    19,     1;

  1,    97,   114,   114,    97,     1;

  1,   601,   696,   710,   696,   601,     1;

  1,  4321,  4920,  5012,  5012,  4920,  4321,     1;

  1, 35281, 39600, 40196, 40274, 40196, 39600, 35281, 1;

MAPLE

seq(seq( n! -k! -(n-k)! +2, k=0..n), n=0..10); # G. C. Greubel, Dec 02 2019

MATHEMATICA

Table[n! -k! -(n-k)! +2, {n, 0, 10}, {k, 0, n}]//Flatten

PROG

(PARI) T(n, k) = n! -k! -(n-k)! +2; \\ G. C. Greubel, Dec 02 2019

(MAGMA) F:=Factorial; [F(n) -F(k) -F(n-k) +2: k in [0..n], n in [0..10]]; // G. C. Greubel, Dec 02 2019

(Sage) f=factorial; [[f(n) -f(k) -f(n-k) +2 for k in (0..n)] for n in (0..10)] # G. C. Greubel, Dec 02 2019

(GAP) F:=Factorial;; Flat(List([0..10], n-> List([0..n], k-> F(n) -F(k) -F(n-k) +2 ))); # G. C. Greubel, Dec 02 2019

CROSSREFS

Sequence in context: A211400 A060854 A091378 * A119687 A086856 A052916

Adjacent sequences:  A156042 A156043 A156044 * A156046 A156047 A156048

KEYWORD

nonn,tabl

AUTHOR

Roger L. Bagula, Feb 02 2009

EXTENSIONS

Edited by G. C. Greubel, Dec 02 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 February 27 03:50 EST 2020. Contains 332299 sequences. (Running on oeis4.)