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-3 of 3 results.

A050871 Row sums of even numbered rows of array T in A050870 (periodic binary words).

Original entry on oeis.org

0, 2, 4, 10, 16, 34, 76, 130, 256, 568, 1036, 2050, 4336, 8194, 16396, 33814, 65536, 131074, 266176, 524290, 1048816, 2113462, 4194316, 8388610, 16842496, 33555424, 67108876, 134479360, 268435696, 536870914, 1074793396, 2147483650
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • PARI
    T(n, k) = binomial(n, k) - sumdiv(gcd(n+!n, k), d, moebius(d)*binomial(n/d, k/d)); \\ Michel Marcus, Aug 20 2021
    row(n) = vector(n+1, k, k--; T(n, k));
    a(n) = n*=2; vecsum(row(n)); \\ Michel Marcus, Aug 20 2021
    
  • Python
    from sympy import mobius, divisors
    def A050871(n): return -sum(mobius((n<<1)//d)<Chai Wah Wu, Sep 21 2024

Extensions

a(29) onward corrected by Sean A. Irvine, Aug 20 2021

A050872 a(n) = (1/2)*A050871 (row sums of array T in A050870, periodic binary words).

Original entry on oeis.org

0, 1, 2, 5, 8, 17, 38, 65, 128, 284, 518, 1025, 2168, 4097, 8198, 16907, 32768, 65537, 133088, 262145, 524408, 1056731, 2097158, 4194305, 8421248, 16777712, 33554438, 67239680, 134217848, 268435457, 537396698, 1073741825, 2147483648
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • PARI
    T(n, k) = binomial(n, k) - sumdiv(gcd(n+!n, k), d, moebius(d)*binomial(n/d, k/d)); \\ A050870
    row(n) = vector(n+1, k, k--; T(n, k));
    a(n) = n*=2; vecsum(row(n))/2; \\ Michel Marcus, Aug 20 2021
    
  • Python
    from sympy import mobius, divisors
    def A050872(n): return -sum(mobius((n<<1)//d)<Chai Wah Wu, Sep 21 2024

Extensions

a(29) onward corrected by Sean A. Irvine, Aug 20 2021

A152061 Counts of unique periodic binary strings of length n.

Original entry on oeis.org

0, 0, 2, 2, 4, 2, 10, 2, 16, 8, 34, 2, 76, 2, 130, 38, 256, 2, 568, 2, 1036, 134, 2050, 2, 4336, 32, 8194, 512, 16396, 2, 33814, 2, 65536, 2054, 131074, 158, 266176, 2, 524290, 8198, 1048816, 2, 2113462, 2, 4194316, 33272, 8388610, 2, 16842496, 128, 33555424
Offset: 0

Views

Author

Jin S. Choi, Sep 24 2011

Keywords

Comments

a(p) = 2 for p prime.

Examples

			a(3) = 2 = |{ 000, 111 }|, a(4) = 4 = |{ 0000, 1111, 0101, 1010 }|.
		

Crossrefs

Row sums of A050870.
A050871 is bisection (even part). - R. J. Mathar, Sep 24 2011

Programs

  • Maple
    with(numtheory):
    a:= n-> `if`(n=0, 0, 2^n -add(mobius(n/d)*2^d, d=divisors(n))):
    seq(a(n), n=0..100);  # Alois P. Heinz, Sep 26 2011
  • Mathematica
    a[0] = 0; a[n_] := 2^n - Sum[MoebiusMu[n/d]*2^d, {d, Divisors[n]}];
    Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Jul 04 2019 *)
  • Python
    from sympy import mobius, divisors
    def A152061(n): return -sum(mobius(n//d)<Chai Wah Wu, Sep 21 2024

Formula

a(n) = 2^n - A001037(n) * n for n>0, a(0) = 0.
a(n) = 2^n - A027375(n) for n>0, a(0) = 0.
a(n) = 2^n - Sum_{d|n} mu(n/d) 2^d for n>0, a(0) = 0.
a(n) = 2^n - A143324(n,2).
a(n) = 2 * A178472(n) for n > 0. - Alois P. Heinz, Jul 04 2019
Showing 1-3 of 3 results.