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.

Showing 1-2 of 2 results.

A279205 Length of second run of 1's in binary representation of Catalan(n).

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 1, 1, 2, 1, 2, 1, 1, 2, 1, 1, 2, 3, 4, 1, 3, 2, 1, 6, 1, 2, 1, 4, 7, 5, 2, 3, 1, 4, 2, 1, 1, 5, 2, 1, 3, 1, 1, 3, 3, 3, 3, 8, 2, 1, 2, 2, 1, 3, 2, 2, 1, 1, 1, 1, 3, 2, 1, 1, 2, 1, 4, 1, 2, 4, 1, 2, 3, 1, 1, 1, 2, 1, 1, 5, 1, 1, 1, 5, 4, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 3, 2, 2, 1, 1
Offset: 0

Views

Author

N. J. A. Sloane, Dec 21 2016

Keywords

Comments

Suggested by A279026.
What combinatorial problem is this the answer to?

Examples

			A000108(13) = 742900_10 = A264663(13) = 10110101010111110100_2, so a(13) = 2.
		

Crossrefs

Programs

  • Mathematica
    Q = {};
    Num = 100;
    T = Table[IntegerDigits[CatalanNumber[n], 2], {n, 0, Num}];
    For[i = 1, i <= Num, i++,
    c = 0; j = 1;
    While[T[[i]][[j]] == 1, j++];
    While[T[[i]][[j]] == 0, j++];
    c = j;
    While[T[[i]][[j]] == 1, j++];
    c = j - c;
    AppendTo[Q, c]
    ];
    Q (* Benedict W. J. Irwin, Dec 21 2016 *)
    Join[{0,0,0,1,0},Length[Split[IntegerDigits[#,2]][[3]]]&/@ CatalanNumber[ Range[5,100]]] (* Harvey P. Dale, Aug 20 2021 *)

Extensions

a(19) to a(99) from Benedict W. J. Irwin, Dec 21 2016

A279206 Length of first run of 0's in binary representation of Catalan(n).

Original entry on oeis.org

0, 0, 1, 1, 1, 1, 4, 1, 1, 2, 5, 2, 2, 1, 1, 2, 4, 1, 3, 1, 4, 1, 1, 2, 2, 3, 4, 2, 1, 3, 1, 2, 3, 1, 1, 1, 1, 2, 2, 2, 3, 3, 4, 3, 1, 1, 2, 8, 1, 1, 2, 3, 5, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 4, 4, 6, 1, 3, 2, 1, 1, 2, 6, 1, 1, 1, 2, 2, 2, 3, 6, 1, 1, 1, 1, 1, 1
Offset: 0

Views

Author

N. J. A. Sloane, Dec 22 2016

Keywords

Comments

What combinatorial problem is this the answer to?

Examples

			A000108(13) = 742900_10 = A264663(13) = 10110101010111110100_2, so a(13) = 1.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local L; uses ListTools;
        L:= [1,op(convert(binomial(2*n,n)/(n+1),base,2))];
        L:= Reverse(L[2..-1]-L[1..-2]);
        Search(-1,L) - Search(1,L);
    end proc:
    map(f, [$0..100]); # Robert Israel, Dec 22 2016
  • Mathematica
    Table[First[Map[Length, DeleteCases[Split@ IntegerDigits[CatalanNumber@ n, 2], w_ /; Times @@ w > 0]] /. {} -> {0}], {n, 0, 89}] (* Michael De Vlieger, Dec 22 2016 *)
Showing 1-2 of 2 results.