login
A051778
Triangle read by rows, where row (n) = n mod (n-1), n mod (n-2), n mod (n-3), ...n mod 2.
8
1, 1, 0, 1, 2, 1, 1, 2, 0, 0, 1, 2, 3, 1, 1, 1, 2, 3, 0, 2, 0, 1, 2, 3, 4, 1, 0, 1, 1, 2, 3, 4, 0, 2, 1, 0, 1, 2, 3, 4, 5, 1, 3, 2, 1, 1, 2, 3, 4, 5, 0, 2, 0, 0, 0, 1, 2, 3, 4, 5, 6, 1, 3, 1, 1, 1, 1, 2, 3, 4, 5, 6, 0, 2, 4, 2, 2, 0, 1, 2, 3, 4, 5, 6, 7, 1, 3, 0, 3, 0, 1, 1, 2, 3, 4, 5, 6, 7, 0, 2, 4, 1, 0, 1, 0
OFFSET
3,5
COMMENTS
Central terms: a(2*n+1,n) = n for n > 0. - Reinhard Zumkeller, Dec 03 2014
Deleting column 1 of the array at A051126 gives the array A051778 in square format (see Example). - Clark Kimberling, Feb 04 2016
LINKS
EXAMPLE
row (7) = 7 mod 6, 7 mod 5, 7 mod 4, 7 mod 3, 7 mod 2 = 1, 2, 3, 1, 1.
1;
1 0 ;
1 2 1 ;
1 2 0 0 ;
1 2 3 1 1 ;
1 2 3 0 2 0 ;
1 2 3 4 1 0 1 ;
1 2 3 4 0 2 1 0 ;
1 2 3 4 5 1 3 2 1 ;
1 2 3 4 5 0 2 0 0 0 ;
1 2 3 4 5 6 1 3 1 1 1 ;
Northwest corner of square array:
1 1 1 1 1 1 1 1 1 1 1
0 2 2 2 2 2 2 2 2 2 2
1 0 3 3 3 3 3 3 3 3 3
0 1 0 4 4 4 4 4 4 4 4
1 2 1 0 5 5 5 5 5 5 5
0 0 2 1 0 6 6 6 6 6 6
1 1 3 2 1 0 7 7 7 7 7
- Clark Kimberling, Feb 04 2016
MATHEMATICA
Flatten[Table[Mod[n, i], {n, 3, 20}, {i, n-1, 2, -1}]] (* Harvey P. Dale, Sep 09 2012 *)
TableForm[Table[Mod[n, k], {n, 1, 12}, {k, 2, 12}]] (* square *)
(* Clark Kimberling, Feb 04 2016 *)
PROG
(Haskell)
a051778 n k = a051778_tabl !! (n-3) !! (k-1)
a051778_row n = a051778_tabl !! (n-3)
a051778_tabl = map (\xs -> map (mod (head xs + 1)) xs) $
iterate (\xs -> (head xs + 1) : xs) [2]
-- Reinhard Zumkeller, Dec 03 2014
CROSSREFS
Cf. A004125 (row sums), A000027 (central terms), A049820 (number of nonzeros per row), A032741 (number of ones per row), A070824 (number of zeros per row).
Sequence in context: A000989 A132401 A104273 * A390078 A057554 A060575
KEYWORD
easy,nice,nonn,tabl
AUTHOR
Asher Auel, Dec 09 1999
STATUS
approved