cp's OEIS Frontend

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.

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.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Aug 16 2015

Keywords

Comments

Suggested by A260273.

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
		

Crossrefs

See A261019 for a more compact version (which has further information about the columns).

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