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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A240857 Triangle read by rows: T(0,0) = 0; T(n+1,k) = T(n,k+1), 0 <= k < n; T(n+1,n) = T(n,0); T(n+1,n+1) = T(n,0)+1. 7
 0, 0, 1, 1, 0, 1, 0, 1, 1, 2, 1, 1, 2, 0, 1, 1, 2, 0, 1, 1, 2, 2, 0, 1, 1, 2, 1, 2, 0, 1, 1, 2, 1, 2, 2, 3, 1, 1, 2, 1, 2, 2, 3, 0, 1, 1, 2, 1, 2, 2, 3, 0, 1, 1, 2, 2, 1, 2, 2, 3, 0, 1, 1, 2, 1, 2, 1, 2, 2, 3, 0, 1, 1, 2, 1, 2, 2, 3, 2, 2, 3, 0, 1, 1, 2, 1 (list; table; graph; refs; listen; history; text; internal format)
 OFFSET 0,10 COMMENTS Let h be the initial term of row n, to get row n+1, remove h and then append h and h+1; For n > 0: T(n,A035327(n)) = 0. LINKS Reinhard Zumkeller, Rows n = 0..125 of triangle, flattened FORMULA T(n,k) = A048881(n+k), 0 <= k <= n. EXAMPLE . 0: 0 . 1: 0 1 . 2: 1 0 1 . 3: 0 1 1 2 . 4: 1 1 2 0 1 . 5: 1 2 0 1 1 2 . 6: 2 0 1 1 2 1 2 . 7: 0 1 1 2 1 2 2 3 . 8: 1 1 2 1 2 2 3 0 1 . 9: 1 2 1 2 2 3 0 1 1 2 . 10: 2 1 2 2 3 0 1 1 2 1 2 . 11: 1 2 2 3 0 1 1 2 1 2 2 3 . 12: 2 2 3 0 1 1 2 1 2 2 3 1 2 . 13: 2 3 0 1 1 2 1 2 2 3 1 2 2 3 . 14: 3 0 1 1 2 1 2 2 3 1 2 2 3 2 3 . 15: 0 1 1 2 1 2 2 3 1 2 2 3 2 3 3 4 . PROG (Haskell) a240857 n k = a240857_tabl !! n !! k a240857_row n = a240857_tabl !! n a240857_tabl = iterate (\(x:xs) -> xs ++ [x, x + 1]) [0] CROSSREFS Cf. A048881 (left edge), A000120 (right edge), A000788 (row sums), A000523 (row maxima), A240883 (central terms). Sequence in context: A137412 A355913 A025925 * A109066 A079066 A157188 Adjacent sequences: A240854 A240855 A240856 * A240858 A240859 A240860 KEYWORD nonn,tabl AUTHOR Reinhard Zumkeller, Apr 14 2014 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.

Last modified March 31 09:22 EDT 2023. Contains 361646 sequences. (Running on oeis4.)