OFFSET
1,2
COMMENTS
The interesting property of this array is that the main diagonal gives A000960.
LINKS
G. C. Greubel, Rows n = 1..50 of the triangle, flattened
H. Killingbergtro and C. U. Jensen, Problem 116, Nord. Mat. Tidskr. 5 (1957), 160-161.
FORMULA
Form an array a(m,n) (n >= 1, 1 <= m <= n) by: a(1,n) = n^2 for all n; a(m+1,n) = (n-m)*floor( (a(m,n)-1)/(n-m) ) for 1 <= m <= n-1.
EXAMPLE
Array begins:
1 4 9 16 25 36 49 64 81 100 ...
3 8 15 24 35 48 63 80 99 ...
7 14 21 32 45 60 77 96 ...
13 20 30 44 55 72 91 ...
19 28 42 52 70 90 ...
and triangle begins:
1
3 4
7 8 9
13 14 15 16
19 20 21 24 25
27 28 30 32 35 36
...
MATHEMATICA
max=11; a[1, n_]:= n^2;
a[m_, n_]/; 1<m<=n := a[m, n]= (n-m+1)*Floor@((a[m-1, n] -1)/(n-m+1));
a[_, _]=0;
t= Table[a[m, n], {m, max}, {n, m, max}];
Flatten[Table[t[[m-n+1, n]], {m, max}, {n, m}]] (* Jean-François Alcover, Feb 21 2012 *)
PROG
(Magma)
function t(n, k) // t = A100452
if k eq 1 then return n^2;
else return (n-k+1)*Floor((t(n, k-1) -1)/(n-k+1));
end if;
end function;
[t(n, n-k+1): k in [1..n], n in [1..15]]; // G. C. Greubel, Apr 07 2023
(SageMath)
def t(n, k): # t = A100452
if (k==1): return n^2
else: return (n-k+1)*((t(n, k-1) -1)//(n-k+1))
flatten([[t(n, n-k+1) for k in range(1, n+1)] for n in range(1, 16)]) # G. C. Greubel, Apr 07 2023
CROSSREFS
KEYWORD
AUTHOR
N. J. A. Sloane, Nov 22 2004
STATUS
approved