cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A227550 A triangle formed like Pascal's triangle, but with factorial(n) on the borders instead of 1.

This page as a plain text file.
%I A227550 #24 May 03 2021 01:24:41
%S A227550 1,1,1,2,2,2,6,4,4,6,24,10,8,10,24,120,34,18,18,34,120,720,154,52,36,
%T A227550 52,154,720,5040,874,206,88,88,206,874,5040,40320,5914,1080,294,176,
%U A227550 294,1080,5914,40320,362880,46234,6994,1374,470,470,1374,6994,46234,362880,3628800
%N A227550 A triangle formed like Pascal's triangle, but with factorial(n) on the borders instead of 1.
%C A227550 A003422 gives the second column (after 0).
%H A227550 Vincenzo Librandi, <a href="/A227550/b227550.txt">Rows n = 0..70, flattened</a>
%F A227550 From _G. C. Greubel_, May 02 2021: (Start)
%F A227550 T(n, k) = T(n-1, k-1) + T(n-1, k) with T(n, 0) = T(n, n) = n!.
%F A227550 Sum_{k=0..n} T(n, k) = 2^n * (1 +Sum_{j=1..n-1} j*j!/2^j) = A140710(n). (End)
%e A227550 Triangle begins:
%e A227550        1;
%e A227550        1,     1;
%e A227550        2,     2,    2;
%e A227550        6,     4,    4,    6;
%e A227550       24,    10,    8,   10,  24;
%e A227550      120,    34,   18,   18,  34, 120;
%e A227550      720,   154,   52,   36,  52, 154,  720;
%e A227550     5040,   874,  206,   88,  88, 206,  874, 5040;
%e A227550    40320,  5914, 1080,  294, 176, 294, 1080, 5914, 40320;
%e A227550   362880, 46234, 6994, 1374, 470, 470, 1374, 6994, 46234, 362880;
%t A227550 t = {}; Do[r = {}; Do[If[k == 0||k == n, m = n!, m = t[[n, k]] + t[[n, k + 1]]]; r = AppendTo[r, m], {k, 0, n}]; AppendTo[t, r], {n, 0, 10}]; t = Flatten[t]
%o A227550 (Haskell)
%o A227550 a227550 n k = a227550_tabl !! n !! k
%o A227550 a227550_row n = a227550_tabl !! n
%o A227550 a227550_tabl = map fst $ iterate
%o A227550    (\(vs, w:ws) -> (zipWith (+) ([w] ++ vs) (vs ++ [w]), ws))
%o A227550    ([1], a001563_list)
%o A227550 -- _Reinhard Zumkeller_, Aug 05 2013
%o A227550 (Magma)
%o A227550 function T(n,k)
%o A227550   if k eq 0 or k eq n then return Factorial(n);
%o A227550   else return T(n-1,k-1) + T(n-1,k);
%o A227550   end if; return T;
%o A227550 end function;
%o A227550 [T(n,k): k in [0..n], n in [0..12]]; // _G. C. Greubel_, May 02 2021
%o A227550 (Sage)
%o A227550 def T(n,k): return factorial(n) if (k==0 or k==n) else T(n-1, k-1) + T(n-1, k)
%o A227550 flatten([[T(n,k) for k in (0..n)] for n in (0..12)]) # _G. C. Greubel_, May 02 2021
%Y A227550 Cf. similar triangles with t on the borders: A007318 (t = 1), A028326 (t = 2), A051599 (t = prime(n)), A051601 (t = n), A051666 (t = n^2), A108617 (t = fibonacci(n)), A134636 (t = 2n+1), A137688 (t = 2^n), A227075 (t = 3^n).
%Y A227550 Cf. A003422.
%Y A227550 Cf. A227791 (central terms), A001563, A074911.
%K A227550 nonn,tabl
%O A227550 0,4
%A A227550 _Vincenzo Librandi_, Aug 04 2013