A261019 Irregular triangle read by rows: T(n,k) (0 <= k <= A261017(n)) = number of binary strings of length n such that the smallest number whose binary representation is not visible in the string is k.
1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 3, 6, 4, 1, 1, 1, 4, 11, 10, 5, 1, 1, 5, 19, 21, 15, 0, 2, 1, 1, 6, 32, 40, 35, 2, 9, 2, 1, 1, 7, 53, 72, 73, 6, 31, 10, 2, 1, 1, 8, 87, 125, 144, 15, 79, 40, 12, 1, 1, 9, 142, 212, 274, 32, 185, 116, 52, 1, 1, 10, 231, 354, 509, 64, 408, 296, 168, 2, 4
Offset: 1
Examples
The first 16 rows are: 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 3, 6, 4, 1, 1, 1, 4, 11, 10, 5, 1, 1, 5, 19, 21, 15, 0, 2, 1, 1, 6, 32, 40, 35, 2, 9, 2, 1, 1, 7, 53, 72, 73, 6, 31, 10, 2, 1, 1, 8, 87, 125, 144, 15, 79, 40, 12, 1, 1, 9, 142, 212, 274, 32, 185, 116, 52, 1, 1, 10, 231, 354, 509, 64, 408, 296, 168, 2, 4, 1, 1, 11, 375, 585, 931, 120, 864, 699, 461, 24, 24, 1, 1, 12, 608, 960, 1685, 218, 1771, 1557, 1133, 130, 110, 2, 4, 1, 1, 13, 985, 1568, 3027, 385, 3555, 3325, 2612, 471, 387, 14, 24, 0, 16, 1, 1, 14, 1595, 2553, 5409, 668, 7021, 6893, 5759, 1401, 1135, 92, 120, 0, 90, 16, 1, 1, 15, 2582, 4148, 9628, 1142, 13696, 13964, 12309, 3734, 2972, 373, 439, 28, 390, 98, 16, ...
Links
- Alois P. Heinz, N. J. A. Sloane, R. Zumkeller and Hiroaki Yamanouchi, Rows n = 1..58, flattened (rows 17..25 from R. Zumkeller, rows 26..36 from Alois P. Heinz)
- R. Zumkeller, The first 25 rows of the triangle, displayed as a triangle (similar to the way the rows are shown in the Example section, but showing 25 rows).
Crossrefs
Programs
-
Haskell
import Data.List (isInfixOf, sort, group) a261019 n k = a261019_tabf !! (n-1) !! k a261019_row n = a261019_tabf !! (n-1) a261019_tabf = map (i 0 . group . sort . map f) a076478_tabf where f bs = g a030308_tabf where g (cs:css) | isInfixOf cs bs = g css | otherwise = foldr (\d v -> 2 * v + d) 0 cs i _ [] = [] i r gss'@(gs:gss) | head gs == r = (length gs) : i (r + 1) gss | otherwise = 0 : i (r + 1) gss' -- Reinhard Zumkeller, Aug 18 2015
Comments