OFFSET
1,2
COMMENTS
Omitting repeats yields the triangular numbers plus 1 sequence A000124.
FORMULA
G.f.: x*y*(1 + 2*x^4*y^2 - x*(1 + y) - 2*x^3*y*(1 + y) + x^2*(1 + y + y^2))/((1 - x)^3*(1 - x*y)^3). - Stefano Spezia, Sep 02 2023
Sum_{k=1..n} k = T(n,k) = A006528(n). - Alois P. Heinz, Sep 15 2023
EXAMPLE
Illustrated as a triangle begins:
1;
2, 2;
4, 4, 4;
7, 7, 7, 7;
11, 11, 11, 11, 11;
16, 16, 16, 16, 16, 16;
22, 22, 22, 22, 22, 22, 22;
...
MAPLE
T:= (n, k)-> n*(n-1)/2+1:
seq(seq(T(n, k), k=1..n), n=1..11); # Alois P. Heinz, Aug 31 2023
PROG
(PARI) a(n) = my(t=(sqrtint(8*n-1)-1)\2); t*(t+1)/2+1 \\ Thomas Scheuerle, Aug 10 2023
(Python)
from math import isqrt
def A364843(n): return ((t:=isqrt((n<<3)-1)-1>>1)*(t+1)>>1)+1 # Chai Wah Wu, Sep 15 2023
CROSSREFS
KEYWORD
AUTHOR
Peter Woodward, Aug 10 2023
STATUS
approved