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.

A216953 Triangle read by rows: T(n,k) (n>=1, 1<=k<=n) = number of binary sequences of length n with minimal period k.

Original entry on oeis.org

2, 2, 2, 2, 0, 6, 2, 2, 0, 12, 2, 0, 0, 0, 30, 2, 2, 6, 0, 0, 54, 2, 0, 0, 0, 0, 0, 126, 2, 2, 0, 12, 0, 0, 0, 240, 2, 0, 6, 0, 0, 0, 0, 0, 504, 2, 2, 0, 0, 30, 0, 0, 0, 0, 990, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2046, 2, 2, 6, 12, 0, 54, 0, 0, 0, 0, 0, 4020, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8190, 2, 2, 0, 0, 0, 0, 126, 0, 0, 0, 0, 0, 0, 16254
Offset: 1

Views

Author

N. J. A. Sloane, Sep 25 2012

Keywords

Examples

			Triangle begins:
2,
2, 2,
2, 0, 6,
2, 2, 0, 12,
2, 0, 0, 0, 30,
2, 2, 6, 0, 0, 54,
2, 0, 0, 0, 0, 0, 126,
2, 2, 0, 12, 0, 0, 0, 240,
2, 0, 6, 0, 0, 0, 0, 0, 504,
2, 2, 0, 0, 30, 0, 0, 0, 0, 990,
...
For n=4 the 16 sequences are:
0000, 1111, period 1,
0101, 1010, period 2,
and the rest have period 4.
		

References

Crossrefs

Cf. A027375 (the main diagonal), A216954, A001037.

Programs

  • Maple
    with(numtheory): A027375:=n->add( mobius(d)*2^(n/d), d in divisors(n));
    a:=proc(n,k) global A027375;
    if n mod k = 0 then A027375(k) else 0; fi; end;
  • Mathematica
    a027375[n_] := DivisorSum[n, MoebiusMu[n/#]*2^#&];
    T[n_, k_] := If[Divisible[n, k], a027375[k], 0];
    Table[T[n, k], {n, 1, 14}, {k, 1, n}] // Flatten (* Jean-François Alcover, Nov 26 2017 *)

Formula

If k divides n, T(n,k) = A027375(k), otherwise 0.