login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A048158 Triangular array T read by rows: T(n,k) = n mod k, for k=1,2,...,n, n=1,2,... 17
0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 2, 1, 0, 0, 0, 0, 2, 1, 0, 0, 1, 1, 3, 2, 1, 0, 0, 0, 2, 0, 3, 2, 1, 0, 0, 1, 0, 1, 4, 3, 2, 1, 0, 0, 0, 1, 2, 0, 4, 3, 2, 1, 0, 0, 1, 2, 3, 1, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 2, 0, 5, 4, 3, 2, 1, 0, 0, 1, 1, 1, 3, 1, 6, 5, 4, 3, 2, 1, 0, 0, 0, 2, 2, 4, 2, 0, 6, 5, 4, 3, 2, 1, 0 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
1,13
COMMENTS
Also, rectangular array read by antidiagonals: a(n, k) = n mod k, n >= 0, k >= 1. Cf. A051126, A051127, A051777. - David Wasserman, Oct 01 2008
LINKS
Michael Z. Spivey, The Humble Sum of Remainders Function, Mathematics Magazine, Vol. 78, No. 4 (Oct., 2005), pp. 300-305.
Eric Weisstein's World of Mathematics, Mod.
FORMULA
A051731(n,k) = A000007(T(n,k)). - Reinhard Zumkeller, Nov 01 2009
T(n,k) = n - k*A010766(n,k). - Mats Granvik, Gary W. Adamson, Feb 20 2010
EXAMPLE
Triangle begins
0;
0 0;
0 1 0;
0 0 1 0;
0 1 2 1 0;
0 0 0 2 1 0;
0 1 1 3 2 1 0;
0 0 2 0 3 2 1 0;
0 1 0 1 4 3 2 1 0;
0 0 1 2 0 4 3 2 1 0;
0 1 2 3 1 5 4 3 2 1 0;
0 0 0 0 2 0 5 4 3 2 1 0;
...
From Omar E. Pol, Feb 21 2014: (Start)
Illustration of the 12th row of triangle:
-----------------------------------
. k: 1 2 3 4 5 6 7 8 9 10..12
-----------------------------------
. _ _ _ _ _ _ _ _ _ _ _ _
. |_| | | | | | | | | | | |
. |_|_| | | | | | | | | | |
. |_| |_| | | | | | | | | |
. |_|_| |_| | | | | | | | |
. |_| | | |_| | | | | | | |
. |_|_|_| | |_| | | | | | |
. |_| | | | | |_| | | | | |
. |_|_| |_| | |*|_| | | | |
. |_| |_| | | |* *|_| | | |
. |_|_| | |_| |* * *|_| | |
. |_| | | |*| |* * * *|_| |
. |_|_|_|_|*|_|* * * * *|_|
.
Row 12 is 0 0 0 0 2 0 5 4 3 2 1 0
.
(End)
MAPLE
T:= (n, k)-> modp(n, k):
seq(seq(T(n, k), k=1..n), n=1..20); # Alois P. Heinz, Apr 04 2012
MATHEMATICA
Flatten[Table[Mod[n, Range[n]], {n, 15}]]
PROG
(Haskell)
a048158 = mod
a048158_row n = a048158_tabl !! (n-1)
a048158_tabl = zipWith (map . mod) [1..] a002260_tabl
-- Reinhard Zumkeller, Apr 29 2015, Jan 20 2014 (fixed), Aug 13 2013
CROSSREFS
Row sums are given by A004125.
Cf. A002260.
Sequence in context: A112207 A112208 A339089 * A275342 A246838 A219479
KEYWORD
nonn,tabl
AUTHOR
EXTENSIONS
More terms from David Wasserman, Oct 01 2008
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 08:45 EDT 2024. Contains 371782 sequences. (Running on oeis4.)