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

%I #41 Feb 06 2024 01:50:39

%S 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,

%T 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,

%U 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

%N Triangular array T read by rows: T(n,k) = n mod k, for k=1,2,...,n, n=1,2,...

%C 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

%H Alois P. Heinz, <a href="/A048158/b048158.txt">Rows n = 1..141, flattened</a>

%H Michael Z. Spivey, <a href="http://www.jstor.org/stable/30044176">The Humble Sum of Remainders Function</a>, Mathematics Magazine, Vol. 78, No. 4 (Oct., 2005), pp. 300-305.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/Mod.html">Mod</a>.

%F A051731(n,k) = A000007(T(n,k)). - _Reinhard Zumkeller_, Nov 01 2009

%F T(n,k) = n - k*A010766(n,k). - _Mats Granvik_, _Gary W. Adamson_, Feb 20 2010

%e Triangle begins

%e 0;

%e 0 0;

%e 0 1 0;

%e 0 0 1 0;

%e 0 1 2 1 0;

%e 0 0 0 2 1 0;

%e 0 1 1 3 2 1 0;

%e 0 0 2 0 3 2 1 0;

%e 0 1 0 1 4 3 2 1 0;

%e 0 0 1 2 0 4 3 2 1 0;

%e 0 1 2 3 1 5 4 3 2 1 0;

%e 0 0 0 0 2 0 5 4 3 2 1 0;

%e ...

%e From _Omar E. Pol_, Feb 21 2014: (Start)

%e Illustration of the 12th row of triangle:

%e -----------------------------------

%e . k: 1 2 3 4 5 6 7 8 9 10..12

%e -----------------------------------

%e . _ _ _ _ _ _ _ _ _ _ _ _

%e . |_| | | | | | | | | | | |

%e . |_|_| | | | | | | | | | |

%e . |_| |_| | | | | | | | | |

%e . |_|_| |_| | | | | | | | |

%e . |_| | | |_| | | | | | | |

%e . |_|_|_| | |_| | | | | | |

%e . |_| | | | | |_| | | | | |

%e . |_|_| |_| | |*|_| | | | |

%e . |_| |_| | | |* *|_| | | |

%e . |_|_| | |_| |* * *|_| | |

%e . |_| | | |*| |* * * *|_| |

%e . |_|_|_|_|*|_|* * * * *|_|

%e .

%e Row 12 is 0 0 0 0 2 0 5 4 3 2 1 0

%e .

%e (End)

%p T:= (n, k)-> modp(n, k):

%p seq(seq(T(n, k), k=1..n), n=1..20); # _Alois P. Heinz_, Apr 04 2012

%t Flatten[Table[Mod[n, Range[n]], {n, 15}]]

%o (Haskell)

%o a048158 = mod

%o a048158_row n = a048158_tabl !! (n-1)

%o a048158_tabl = zipWith (map . mod) [1..] a002260_tabl

%o -- _Reinhard Zumkeller_, Apr 29 2015, Jan 20 2014 (fixed), Aug 13 2013

%Y Row sums are given by A004125.

%Y Cf. A002260.

%Y Cf. A000007, A010766, A051126, A051127, A051731, A051777.

%K nonn,tabl

%O 1,13

%A _Clark Kimberling_

%E More terms from _David Wasserman_, Oct 01 2008

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 24 07:20 EDT 2024. Contains 371921 sequences. (Running on oeis4.)