OFFSET
0,4
LINKS
Rick L. Shepherd, Rows n = 0..500 of triangle, flattened
Eric Weisstein's World of Mathematics, OR.
EXAMPLE
Triangle begins:
0,
1, 1,
2, 3, 2,
3, 3, 3, 3,
4, 5, 6, 7, 4,
5, 5, 7, 7, 5, 5,
6, 7, 6, 7, 6, 7, 6,
7, 7, 7, 7, 7, 7, 7, 7,
8, 9, 10, 11, 12, 13, 14, 15, 8,
9, 9, 11, 11, 13, 13, 15, 15, 9, 9,
10, 11, 10, 11, 14, 15, 14, 15, 10, 11, 10,
...
MATHEMATICA
T[n_, k_] := n ~BitOr~ k;
Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, Dec 01 2021 *)
PROG
(Haskell)
import Data.Bits ((.|.))
a080098 n k = n .|. k :: Int
a080098_row n = map (a080098 n) [0..n]
a080098_tabl = map a080098_row [0..]
-- Reinhard Zumkeller, Aug 03 2014, Jul 05 2012
(Python)
def T(n, k): return n | k
print([T(n, k) for n in range(13) for k in range(n+1)]) # Michael S. Branicky, Dec 01 2021
CROSSREFS
Cf. A001316 (number of integers k such that T(n, k) = n in n-th row).
AUTHOR
Reinhard Zumkeller, Jan 28 2003
STATUS
approved