This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A080098 #38 Feb 16 2025 08:32:48 %S A080098 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, %T A080098 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, %U A080098 15,14,15,10,11,10,11,11,11,11,15,15,15,15,11,11,11,11,12,13,14,15,12,13,14,15,12,13,14,15,12 %N A080098 Triangle T(n,k) = n OR k, 0 <= k <= n, bitwise logical OR, read by rows. %H A080098 Rick L. Shepherd, <a href="/A080098/b080098.txt">Rows n = 0..500 of triangle, flattened</a> %H A080098 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/OR.html">OR.</a> %e A080098 Triangle begins: %e A080098 0, %e A080098 1, 1, %e A080098 2, 3, 2, %e A080098 3, 3, 3, 3, %e A080098 4, 5, 6, 7, 4, %e A080098 5, 5, 7, 7, 5, 5, %e A080098 6, 7, 6, 7, 6, 7, 6, %e A080098 7, 7, 7, 7, 7, 7, 7, 7, %e A080098 8, 9, 10, 11, 12, 13, 14, 15, 8, %e A080098 9, 9, 11, 11, 13, 13, 15, 15, 9, 9, %e A080098 10, 11, 10, 11, 14, 15, 14, 15, 10, 11, 10, %e A080098 ... %t A080098 T[n_, k_] := n ~BitOr~ k; %t A080098 Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* _Jean-François Alcover_, Dec 01 2021 *) %o A080098 (Haskell) %o A080098 import Data.Bits ((.|.)) %o A080098 a080098 n k = n .|. k :: Int %o A080098 a080098_row n = map (a080098 n) [0..n] %o A080098 a080098_tabl = map a080098_row [0..] %o A080098 -- _Reinhard Zumkeller_, Aug 03 2014, Jul 05 2012 %o A080098 (Python) %o A080098 def T(n, k): return n | k %o A080098 print([T(n, k) for n in range(13) for k in range(n+1)]) # _Michael S. Branicky_, Dec 01 2021 %Y A080098 Cf. A001316 (number of integers k such that T(n, k) = n in n-th row). %Y A080098 Cf. A350093 (row sums), A003986 (array). %Y A080098 Other triangles: A080099 (AND), A051933 (XOR), A265705 (IMPL), A102037 (CNIMPL). %K A080098 nonn,easy,tabl,look %O A080098 0,4 %A A080098 _Reinhard Zumkeller_, Jan 28 2003