A274079 Table read by rows: the n-th row is the list of numbers diagonally up and to the right of n in the natural numbers read by antidiagonals.
2, 4, 5, 4, 7, 8, 7, 9, 8, 7, 11, 12, 11, 13, 12, 11, 14, 13, 12, 11, 16, 17, 16, 18, 17, 16, 19, 18, 17, 16, 20, 19, 18, 17, 16, 22, 23, 22, 24, 23, 22, 25, 24, 23, 22, 26, 25, 24, 23, 22, 27, 26, 25, 24, 23, 22, 29, 30, 29, 31, 30, 29, 32, 31, 30, 29, 33, 32
Offset: 1
Examples
A000027 read by antidiagonals is: 1 2 4 7 3 5 8 6 9 ... Thus: Row 1: [] Row 2: [] Row 3: [2] Row 4: [] Row 5: [4] Row 6: [5, 4] Row 7: [] Row 8: [7] Row 9: [8, 7]
Links
- Peter Kagey, Table of n, a(n) for n = 1..10000
Programs
-
Haskell
a274079 n = a274079_list !! (n - 1) a274079_list = concatMap a274079_row [1..] a274079_tabf = map a274079_row [1..] a274079_row n = [n-1, n-2..n - a002262 (n - 1)]
-
Mathematica
Table[Reverse@ Range[SelectFirst[Reverse@ #, # < n &] + 1, n - 1] - 1, {n, 2, 35}] &[Accumulate@ Range[0, 15] + 1] // Flatten (* Michael De Vlieger, Jun 10 2016, Version 10 *)