login
A051126
Table T(n,k) = n mod k read by downward antidiagonals (n >= 1, k >= 1).
10
0, 1, 0, 1, 0, 0, 1, 2, 1, 0, 1, 2, 0, 0, 0, 1, 2, 3, 1, 1, 0, 1, 2, 3, 0, 2, 0, 0, 1, 2, 3, 4, 1, 0, 1, 0, 1, 2, 3, 4, 0, 2, 1, 0, 0, 1, 2, 3, 4, 5, 1, 3, 2, 1, 0, 1, 2, 3, 4, 5, 0, 2, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 1, 3, 1, 1, 1, 0, 1, 2, 3, 4, 5, 6, 0, 2, 4, 2, 2, 0, 0, 1, 2, 3, 4, 5, 6, 7, 1, 3, 0, 3, 0, 1, 0
OFFSET
1,8
LINKS
FORMULA
As a linear array, the sequence is a(n) = A002260(n) mod A004736 (n) or a(n) = (n-(t*(t+1)/2)) mod ((t*t+3*t+4)/2-n), where t = floor((-1+sqrt(8*n-7))/2). - Boris Putievskiy, Dec 19 2012
G.f. of the k-th column: x*Sum_{i=0..k-2} (i + 1)*x^i/(1 - x^k). - Stefano Spezia, May 08 2024
EXAMPLE
Table begins in row n=1:
0 1 1 1 1 1 1 1 1 1 ...
0 0 2 2 2 2 2 2 2 2 ...
0 1 0 3 3 3 3 3 3 3 ...
0 0 1 0 4 4 4 4 4 4 ...
0 1 2 1 0 5 5 5 5 5 ...
0 0 0 2 1 0 6 6 6 6 ...
0 1 1 3 2 1 0 7 7 7 ...
0 0 2 0 3 2 1 0 8 8 ...
0 1 0 1 4 3 2 1 0 9 ...
0 0 1 2 0 4 3 2 1 0 ...
0 1 2 3 1 5 4 3 2 1 ...
0 0 0 0 2 0 5 4 3 2 ...
0 1 1 1 3 1 6 5 4 3 ...
MATHEMATICA
TableForm[Table[Mod[n, k], {n, 1, 16}, {k, 1, 16}]] (* A051126 array *)
Table[Mod[n - k + 1, k], {n, 16}, {k, n, 1, -1}] // Flatten (* A051126 sequence *)
(* Clark Kimberling, Feb 04 2016 *)
CROSSREFS
KEYWORD
nonn,tabl,easy,nice
EXTENSIONS
More terms from James A. Sellers, Dec 11 1999
STATUS
approved