OFFSET
1,2
LINKS
G. C. Greubel, Rows n=1..100 of triangle, flattened
FORMULA
T(n, k) = n*(n-k+1)/(k+1) if n mod k+1 = 0, otherwise T(n, k) = n-k+1.
EXAMPLE
Triangle begins as:
1;
2, 1;
3, 2, 1;
8, 3, 2, 1;
5, 4, 3, 2, 1;
18, 10, 4, 3, 2, 1;
7, 6, 5, 4, 3, 2, 1;
32, 7, 12, 5, 4, 3, 2, 1;
9, 24, 7, 6, 5, 4, 3, 2, 1;
50, 9, 8, 14, 6, 5, 4, 3, 2, 1;
MATHEMATICA
T[n_, k_]:= (n-k+1)*If[Mod[n, k+1]==0, n/(k+1), 1];
Table[T[n, k], {n, 12}, {k, n}]//Flatten
PROG
(Magma)
A141675:= func< n, k | (n mod (k+1)) eq 0 select n*(n-k+1)/(k+1) else n-k+1 >;
[A141675(n, k): k in [1..n], n in [1..12]]; // G. C. Greubel, Apr 06 2024
(SageMath)
def A141675(n, k): return n*(n-k+1)/(k+1) if n%(k+1)==0 else n-k+1
flatten([[A141675(n, k) for k in range(1, n+1)] for n in range(1, 13)]) # G. C. Greubel, Apr 06 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Roger L. Bagula and Gary W. Adamson, Sep 06 2008
EXTENSIONS
Edited by G. C. Greubel, Apr 06 2024
STATUS
approved