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!)
A156045 Triangle T(n, k) = 2 + n! - k! - (n-k)!, read by rows. 1

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

%S 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,

%T 601,1,1,4321,4920,5012,5012,4920,4321,1,1,35281,39600,40196,40274,

%U 40196,39600,35281,1,1,322561,357840,362156,362738,362738,362156,357840,322561,1

%N Triangle T(n, k) = 2 + n! - k! - (n-k)!, read by rows.

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

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

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

%F 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

%e Triangle begins as:

%e 1;

%e 1, 1;

%e 1, 2, 1;

%e 1, 5, 5, 1;

%e 1, 19, 22, 19, 1;

%e 1, 97, 114, 114, 97, 1;

%e 1, 601, 696, 710, 696, 601, 1;

%e 1, 4321, 4920, 5012, 5012, 4920, 4321, 1;

%e 1, 35281, 39600, 40196, 40274, 40196, 39600, 35281, 1;

%p seq(seq( n! -k! -(n-k)! +2, k=0..n), n=0..10); # _G. C. Greubel_, Dec 02 2019

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

%o (PARI) T(n,k) = n! -k! -(n-k)! +2; \\ _G. C. Greubel_, Dec 02 2019

%o (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

%o (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

%o (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

%K nonn,tabl

%O 0,5

%A _Roger L. Bagula_, Feb 02 2009

%E Edited by _G. C. Greubel_, Dec 02 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 11:14 EDT 2024. Contains 371791 sequences. (Running on oeis4.)