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.

A050870 T(h,k) = binomial(h,k) - A050186(h,k).

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 2, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 3, 2, 3, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 4, 0, 6, 0, 4, 0, 1, 1, 0, 0, 3, 0, 0, 3, 0, 0, 1, 1, 0, 5, 0, 10, 2, 10, 0, 5, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 6, 4, 15, 0, 24, 0, 15, 4, 6, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 7, 0, 21, 0, 35, 2, 35, 0, 21, 0, 7, 0, 1, 1, 0
Offset: 0

Views

Author

Keywords

Comments

T(h,k) = number of periodic binary words of k 1's and h-k 0's.

Examples

			0;
0,0;
1,0,1;
1,0,0,1;
1,0,2,0,1;
1,0,0,0,0,1;
1,0,3,2,3,0,1;
1,0,0,0,0,0,0,1;
1,0,4,0,6,0,4,0,1;
1,0,0,3,0,0,3,0,0,1;
1,0,5,0,10,2,10,0,5,0,1;
		

Crossrefs

Cf. A007318. Different from A053200.

Programs

  • Maple
    A050186 := proc(n,k)
            if n = 0 then
                    1;
            else
            add (numtheory[mobius](d)*binomial(n/d,k/d),d =numtheory[divisors](igcd(n,k))) ;
            end if;
    end proc:
    A050870 := proc(n,k)
            binomial(n,k)-A050186(n,k) ;
    end proc:
    seq(seq(A050870(n,k),k=0..n),n=0..20) ; # R. J. Mathar, Sep 24 2011
  • Mathematica
    T[n_, k_] := Binomial[n, k] - If[n == 0, 1, Sum[MoebiusMu[d] Binomial[n/d, k/d], {d, Divisors[GCD[n, k]]}]];
    Table[T[n, k], {n, 0, 15}, {k, 0, n}] (* Jean-François Alcover, Jul 01 2019 *)

Extensions

Edited by N. J. A. Sloane, Aug 29 2008