OFFSET
0,8
COMMENTS
FORMULA
Take successively sequences n*(n-1)/2, n*(3*n-1)/2, n*(5*n-1)/2, ... listed in the EXAMPLE section.
G.f.: y*(x + y)/((1 - y)^3*(1 - x)^2). - Stefano Spezia, Mar 06 2023
E.g.f.: exp(x+y)*y*(2*x + y + 2*x*y)/2. - Stefano Spezia, Feb 21 2024
EXAMPLE
The rows are
0, 0, 1, 3, 6, 10, 15, 21, ... = A161680
0, 1, 5, 12, 22, 35, 51, 70, ... = A000326
0, 2, 9, 21, 38, 60, 87, 119, ... = A005476
0, 3, 13, 30, 54, 85, 123, 168, ... = A022264
0, 4, 17, 39, 70, 110, 159, 217, ... = A022266
... .
Columns: A000004, A001477, A016813, A017197=3*A016777, 2*A017101, 5*A016873, 3*A017581, 7*A017017, ... (coefficients from A026741).
This square array read by antidiagonals leads to the triangle
0
0 0
0 1 1
0 2 5 3
0 3 9 12 6
0 4 13 21 22 10
0 5 17 30 38 35 15
... .
MATHEMATICA
T[n_, k_] := k*((2*n + 1)*k - 1)/2; Table[T[n - k, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Amiram Eldar, Mar 05 2023 *)
PROG
(PARI) a(n) = { my(row = (sqrtint(8*n+1)-1)\2, column = n - binomial(row + 1, 2)); binomial(column, 2) + column^2 * (row - column) } \\ David A. Corneth, Mar 05 2023
(Python) # Seen as a triangle:
from functools import cache
@cache
def Trow(n: int) -> list[int]:
if n == 0: return [0]
r = Trow(n - 1)
return [r[k] + k * k if k < n else r[n - 1] + n - 1 for k in range(n + 1)]
for n in range(7): print(Trow(n)) # Peter Luschny, Mar 05 2023
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Paul Curtz, Mar 05 2023
STATUS
approved