A261015 Irregular triangle read by rows: T(n,k) (0 <= k <= 2^n-1) = 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, 0, 0, 0, 1, 1, 3, 6, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 4, 11, 10, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 5, 19, 21, 15, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1
Examples
Triangle begins: 1,1, 1,1,1,1, 1,1,2,3,1,0,0,0, 1,1,3,6,4,1,0,0,0,0,0,0,0,0,0,0, ... For row 3, here are the 8 strings of length 3 and for each one, the smallest missing number k: 000 1 001 2 010 3 011 2 100 3 101 3 110 4 111 0
Links
- Alois P. Heinz, Rows n = 1..15, flattened
Crossrefs
Programs
-
Mathematica
notVis[bits_] := For[i = 0, True, i++, If[SequencePosition[bits, IntegerDigits[i, 2]] == {}, Return[i]]]; T[n_, k_] := Select[Rest[IntegerDigits[#, 2]]& /@ Range[2^n, 2^(n+1)-1], notVis[#] == k&] // Length; Table[T[n, k], {n, 1, 6}, {k, 0, 2^n-1}] // Flatten (* Jean-François Alcover, Aug 02 2018 *)
Extensions
More terms from Alois P. Heinz, Aug 17 2015
Comments