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.

A105060 Triangle read by rows in which the n-th row consists of the first n nonzero terms of A033312.

Original entry on oeis.org

1, 1, 5, 1, 5, 23, 1, 5, 23, 119, 1, 5, 23, 119, 719, 1, 5, 23, 119, 719, 5039, 1, 5, 23, 119, 719, 5039, 40319, 1, 5, 23, 119, 719, 5039, 40319, 362879, 1, 5, 23, 119, 719, 5039, 40319, 362879, 3628799, 1, 5, 23, 119, 719, 5039, 40319, 362879, 3628799, 39916799
Offset: 1

Views

Author

Roger L. Bagula, Apr 05 2005

Keywords

Examples

			Triangle begins as:
  1;
  1, 5;
  1, 5, 23;
  1, 5, 23, 119;
  1, 5, 23, 119, 719;
  1, 5, 23, 119, 719, 5039;
  1, 5, 23, 119, 719, 5039, 40319;
		

Crossrefs

Programs

  • Magma
    function T(n,k)
      if k eq 1 then return 1;
      else return T(n,k-1) + k*Factorial(k);
      end if;
    end function;
    [T(n,k): k in [1..n], n in [1..12]]; // G. C. Greubel, Mar 13 2023
    
  • Mathematica
    a[n_]:= a[n]= If[n==1, 1, a[n-1] + k!*n];
    Table[a[k], {n,12}, {k,n}]//Flatten
  • SageMath
    @CachedFunction
    def T(n,k):
        if (k==1): return 1
        else: return T(n,k-1) + k*factorial(k)
    flatten([[T(n,k) for k in range(1,n+1)] for n in range(1,10)]) # G. C. Greubel, Mar 13 2023

Formula

From G. C. Greubel, Mar 13 2023: (Start)
T(n, k) = T(n,k-1) + k*k!, with T(n, 1) = 1.
Sum_{k=1..n} T(n, k) = -A007489(n+2) + (n+4)*A007489(n+1) - (n+2)*A007489(n) - (n+1). (End)