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.

A173476 Triangle T(n, k) = 1 + (k!)^2 - 2*k!*(n-k)! + ((n-k)!)^2, read by rows.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 26, 2, 2, 26, 530, 26, 1, 26, 530, 14162, 530, 17, 17, 530, 14162, 516962, 14162, 485, 1, 485, 14162, 516962, 25391522, 516962, 13925, 325, 325, 13925, 516962, 25391522, 1625621762, 25391522, 515525, 12997, 1, 12997, 515525, 25391522, 1625621762
Offset: 0

Views

Author

Roger L. Bagula, Feb 19 2010

Keywords

Examples

			Triangle begins as:
           1;
           1,        1;
           2,        1,      2;
          26,        2,      2,    26;
         530,       26,      1,    26, 530;
       14162,      530,     17,    17, 530, 14162;
      516962,    14162,    485,     1, 485, 14162, 516962;
    25391522,   516962,  13925,   325, 325, 13925, 516962, 25391522;
  1625621762, 25391522, 515525, 12997,   1, 12997, 515525, 25391522, 1625621762;
		

Crossrefs

Programs

  • Magma
    [(Factorial(n-k) -Factorial(k))^2 +1: k in [0..n], n in [0..12]]; // G. C. Greubel, Feb 19 2021
  • Mathematica
    Table[((n-k)! -k!)^2 +1, {n,0,12}, {k,0,n}]//Flatten (* modified by G. C. Greubel, Feb 19 2021 *)
  • Sage
    flatten([[(factorial(n-k) -factorial(k))^2 +1 for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Feb 19 2021
    

Formula

T(n, k) = 1 + ( (n-k)! - k! )^2.
Sum_{k=0..n} T(n, k) = 1 + n + 2*A061062(n) - 2*A003149(n). - G. C. Greubel, Feb 19 2021

Extensions

Edited by G. C. Greubel, Feb 19 2021