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.

Showing 1-4 of 4 results.

A143217 a(n) = n! * (!(n+1)) = n! * Sum_{k=0..n} k!.

Original entry on oeis.org

1, 2, 8, 60, 816, 18480, 629280, 29806560, 1864154880, 148459288320, 14652782323200, 1754531527795200, 250496911136102400, 42032247888401971200, 8188505926989625036800, 1832839841629043799552000, 467088574163459753336832000, 134454052266325985991942144000
Offset: 0

Views

Author

Gary W. Adamson, Jul 30 2008

Keywords

Examples

			a(4) = 816 = 4! * 34, where 34 = A003422(4) and A000142 = (1, 1, 2, 6, 24, 120, ...).
a(4) = 816 = sum of row 4 terms of triangle A143216: (24 + 24 + 48 + 144 + 576).
		

Crossrefs

Programs

  • Magma
    [Factorial(n)*(&+[Factorial(k): k in [0..n]]): n in [0..30]]; // G. C. Greubel, Jul 12 2022
    
  • Mathematica
    Table[n!*Sum[i!, {i, 0, n}], {n, 0, 16}]
  • SageMath
    f=factorial; [f(n)*sum(f(k) for k in (0..n)) for n in (0..40)] # G. C. Greubel, Jul 12 2022

Formula

a(n) = A000142(n) * A003422(n+1), where A000142 = the factorials and A003422 = partial sums of the factorials. [Corrected by Georg Fischer, Dec 13 2022]
Equals row sums of triangle A143216.

Extensions

Edited and extended by Olivier Gérard, Sep 28 2012

A358446 a(n) = n! * Sum_{k=0..floor(n/2)} 1/binomial(n-k, k).

Original entry on oeis.org

1, 1, 4, 9, 56, 190, 1704, 7644, 93120, 516240, 8136000, 53523360, 1047548160, 7961241600, 187132377600, 1611967392000, 44311886438400, 426483893606400, 13428757601280000, 142790947407360000, 5066854992138240000, 58981696577556480000, 2328441680297779200000
Offset: 0

Views

Author

Vladimir Kruchinin, Nov 16 2022

Keywords

Crossrefs

Programs

  • Maple
    egf := (2*x+1)/((x-1)*(x+1)*(x^2-x-1))-(x*log((1-x)^2*(x+1)))/(-x^2+x+1)^2:
    ser := series(egf, x, 22): seq(n!*coeff(ser, x, n), n = 0..20); # Peter Luschny, Nov 17 2022
  • Maxima
    a(n):=factorial(n)*sum(1/binomial(n-k,k),k,0,floor(n/2));
    
  • SageMath
    def A358446(n):
        return sum(A143216(n, k) // A344391(n, k) for k in range((n+2)//2))
    print([A358446(n) for n in range(23)]) # Peter Luschny, Nov 17 2022

Formula

E.g.f.: (2*x+1)/((x-1)*(x+1)*(x^2-x-1))-(x*log((1-x)^2*(x+1)))/(-x^2+x+1)^2.
a(n) ~ n! * (3 + (-1)^n)/2. - Vaclav Kotesovec, Nov 17 2022
a(n) = Sum_{k=0..floor(n/2)} A143216(n, k)/A344391(n, k). - Peter Luschny, Nov 17 2022

A367964 Triangle of 2-parameter triangular numbers, read by rows. T(n, k) = (n*(n + 1) + k*(k + 1)) / 2.

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 6, 7, 9, 12, 10, 11, 13, 16, 20, 15, 16, 18, 21, 25, 30, 21, 22, 24, 27, 31, 36, 42, 28, 29, 31, 34, 38, 43, 49, 56, 36, 37, 39, 42, 46, 51, 57, 64, 72, 45, 46, 48, 51, 55, 60, 66, 73, 81, 90, 55, 56, 58, 61, 65, 70, 76, 83, 91, 100, 110
Offset: 0

Views

Author

Peter Luschny, Dec 07 2023

Keywords

Comments

If the rows of the triangle are extended for k > n, the array A144216 is created, which is symmetrical to the main diagonal and therefore contains no new information compared to this triangle.

Examples

			Triangle T(n, k) starts:
  0 |  0;
  1 |  1,  2;
  2 |  3,  4,  6;
  3 |  6,  7,  9, 12;
  4 | 10, 11, 13, 16, 20;
  5 | 15, 16, 18, 21, 25, 30;
  6 | 21, 22, 24, 27, 31, 36, 42;
  7 | 28, 29, 31, 34, 38, 43, 49, 56;
  8 | 36, 37, 39, 42, 46, 51, 57, 64, 72;
  9 | 45, 46, 48, 51, 55, 60, 66, 73, 81,  90;
 10 | 55, 56, 58, 61, 65, 70, 76, 83, 91, 100, 110;
.
Start at row 0, column 0 with 0. Go down by adding the column index in step n. At row n, restart the counting and go n steps right by adding the row index in step n, then change direction and go down again by adding the column index. After 3*n steps on this path you are at T(2*n, n) which is 2*triangular(n) + (triangular(2*n) - triangular(n)) = (5*n^2 + 3*n)/2. These are the sliced heptagonal numbers A147875 (see the illustration of Leo Tavares).
.
The equation T(n, k) = (n*(n + 1) + k*(k + 1))/2 can be extended to all n, k in ZZ.
  [n\k] ... -6  -5  -4  -3  -2  -1   0   1   2   3   4   5  ...
  -------------------------------------------------------------
  [-5] ..., 25, 20, 16, 13, 11, 10, 10, 11, 13, 16, 20, 25, ...
  [-4] ..., 21, 16, 12,  9,  7,  6,  6,  7,  9, 12, 16, 21, ...
  [-3] ..., 18, 13,  9,  6,  4,  3,  3,  4,  6,  9, 13, 18, ...
  [-2] ..., 16, 11,  7,  4,  2,  1,  1,  2,  4,  7, 11, 16, ...
  [-1] ..., 15, 10,  6,  3,  1,  0,  0,  1,  3,  6, 10, 15, ...
  [ 0] ..., 15, 10,  6,  3,  1,  0,  0,  1,  3,  6, 10, 15, ...
  [ 1] ..., 16, 11,  7,  4,  2,  1,  1,  2,  4,  7, 11, 16, ...
  [ 2] ..., 18, 13,  9,  6,  4,  3,  3,  4,  6,  9, 13, 18, ...
  [ 3] ..., 21, 16, 12,  9,  7,  6,  6,  7,  9, 12, 16, 21, ...
  [ 4] ..., 25, 20, 16, 13, 11, 10, 10, 11, 13, 16, 20, 25, ...
		

Crossrefs

Cf. A147875 (T(2*n, n)), A016061 (row sums), A367965 (alternating row sums), A143216 (the multiplicative equivalent), A144216 (extended array).

Programs

  • Maple
    T := (n, k) -> (n*(n + 1) + k*(k + 1)) / 2:
    for n from 0 to 10 do seq(T(n, k), k = 0..n) od;
  • Mathematica
    Module[{n=1},NestList[Append[#+n,n*++n]&,{0},10]] (* or *)
    Table[(n(n+1)+k(k+1))/2,{n,0,10},{k,0,n}] (* Paolo Xausa, Dec 07 2023 *)
  • Python
    # A purely additive construction:
    from functools import cache
    @cache
    def a_row(n: int) -> list[int]:
        if n == 0: return [0]
        row = a_row(n - 1) + [0]
        for k in range(n): row[k] += n
        row[n] = row[n - 1] + n
        return row

Formula

Recurrence: T(n, n) = n + T(n, n-1) starting with T(0, 0) = 0.
For k <> n: T(n, k) = n + T(n-1, k).
T(n, k) = t(n) + t(k), where t(n) are the triangular numbers A000217.
G.f.: (x + x*(2 - 5*x + x^2)*y + x^4*y^2)/((1 - x)^3*(1 - x*y)^3). - Stefano Spezia, Dec 07 2023

A368045 Triangle read by rows. T(n, k) = (k*(k + 1)*(2*k + 1) + n*(n + 1)*(2*n + 1)) / 6.

Original entry on oeis.org

0, 1, 2, 5, 6, 10, 14, 15, 19, 28, 30, 31, 35, 44, 60, 55, 56, 60, 69, 85, 110, 91, 92, 96, 105, 121, 146, 182, 140, 141, 145, 154, 170, 195, 231, 280, 204, 205, 209, 218, 234, 259, 295, 344, 408, 285, 286, 290, 299, 315, 340, 376, 425, 489, 570
Offset: 0

Views

Author

Peter Luschny, Dec 09 2023

Keywords

Comments

Consider a sequence-to-triangle transformation a -> T, where a is a 0-based sequence and T a regular (0, 0)-based triangular array. The transformation is recursively defined, starting with T(0, 0) = 0, and T(n, n) = a(n) + T(n, n - 1) for n > 0. For k <> n let T(n, k) = a(n) + T(n-1, k).
If a(n) = 1, then T = A051162; if a(n) = n, then T = A367964 (generalizing the triangular numbers); if a(n) = n^2, then T is this triangle.
In the multiplicative form of the transformation, T(0, 0) is set to 1, and the operation '+' is replaced by '*'. For instance, a(n) = 2 is then mapped to T = A368043 and a(n) = n to A143216.

Examples

			Triangle T(n, k) starts:
  [0] [  0]
  [1] [  1,   2]
  [2] [  5,   6,  10]
  [3] [ 14,  15,  19,  28]
  [4] [ 30,  31,  35,  44,  60]
  [5] [ 55,  56,  60,  69,  85, 110]
  [6] [ 91,  92,  96, 105, 121, 146, 182]
  [7] [140, 141, 145, 154, 170, 195, 231, 280]
  [8] [204, 205, 209, 218, 234, 259, 295, 344, 408]
  [9] [285, 286, 290, 299, 315, 340, 376, 425, 489, 570]
		

Crossrefs

Cf. A000330 (T(n,0)), A056520 (T(n,1)), A005900 (T(n-1,n)), A006331 (T(n,n)), A094952 (T(2*n,n)), A368046 (row sums), A368047 (alternating row sums).
Cf. A051162 (transform of n^0), A367964 (transform of n^1), this sequence (transform of n^2).

Programs

  • Mathematica
    Module[{n=1},NestList[Append[#+n^2,Last[#]+2(n++^2)]&,{0},10]] (* or *)
    Table[(k(k+1)(2k+1)+n(n+1)(2n+1))/6,{n,0,10},{k,0,n}] (* Paolo Xausa, Dec 10 2023 *)
  • Python
    from functools import cache
    @cache
    def Trow(n: int) -> list[int]:
        if n == 0: return [0]
        row = Trow(n - 1) + [0]
        for k in range(n): row[k] += n * n
        row[n] = row[n - 1] + n * n
        return row
    print([k for n in range(10) for k in Trow(n)])

Formula

T(n, k) = A000330(k) + A000330(n).
Showing 1-4 of 4 results.