The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A051777 Triangle read by rows, where row (n) = n mod n, n mod (n-1), n mod (n-2), ...n mod 1. 6

%I #21 Oct 27 2023 22:00:45

%S 0,0,0,0,1,0,0,1,0,0,0,1,2,1,0,0,1,2,0,0,0,0,1,2,3,1,1,0,0,1,2,3,0,2,

%T 0,0,0,1,2,3,4,1,0,1,0,0,1,2,3,4,0,2,1,0,0,0,1,2,3,4,5,1,3,2,1,0,0,1,

%U 2,3,4,5,0,2,0,0,0,0,0,1,2,3,4,5,6,1,3,1,1,1,0,0,1,2,3,4,5,6,0,2,4,2,2,0,0

%N Triangle read by rows, where row (n) = n mod n, n mod (n-1), n mod (n-2), ...n mod 1.

%C Also, rectangular array read by antidiagonals, a(n, k) = k mod n (k >= 0, n >= 1). Cf. A048158, A051127. - _David Wasserman_, Oct 01 2008

%C Central terms: a(2*n - 1, n) = n - 1. - _Reinhard Zumkeller_, Jan 25 2011

%H Reinhard Zumkeller, <a href="/A051777/b051777.txt">Rows n=1..150 of triangle, flattened</a>

%e row (5) = 5 mod 5, 5 mod 4, 5 mod 3, 5 mod 2, 5 mod 1 = 0, 1, 2, 1, 0.

%e 0 ;

%e 0 0 ;

%e 0 1 0 ;

%e 0 1 0 0 ;

%e 0 1 2 1 0;

%e 0 1 2 0 0 0 ;

%e 0 1 2 3 1 1 0 ;

%e 0 1 2 3 0 2 0 0;

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

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

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

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

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

%t Flatten[Table[Mod[n,Range[n,1,-1]],{n,20}]] (* _Harvey P. Dale_, Nov 30 2011 *)

%o (Haskell)

%o a051777 n k = a051777_row n !! (k-1)

%o a051777_row n = map (mod n) [n, n-1 .. 1]

%o a051777_tabl = map a051777_row [1..]

%o -- _Reinhard Zumkeller_, Jan 25 2011

%Y Cf. A051778. Row sums give A004125. Number of 0's in row n gives A000005 (tau(n)). Number of 1's in row n+1 gives A032741(n).

%K easy,nice,nonn,tabl

%O 1,13

%A _Asher Auel_, Dec 09 1999

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 June 2 15:24 EDT 2024. Contains 373040 sequences. (Running on oeis4.)