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

A045654 Number of 2n-bead balanced binary strings, rotationally equivalent to complement.

Original entry on oeis.org

1, 2, 6, 8, 22, 32, 72, 128, 278, 512, 1056, 2048, 4168, 8192, 16512, 32768, 65814, 131072, 262656, 524288, 1049632, 2097152, 4196352, 8388608, 16781384, 33554432, 67117056, 134217728, 268451968, 536870912, 1073774592, 2147483648, 4295033110, 8589934592
Offset: 0

Views

Author

Keywords

Examples

			From _Andrew Howroyd_, Jul 06 2025: (Start)
The a(1) = 2 length 2 balanced binary strings are: 01, 10.
The a(2) = 6 strings are: 0101, 1010, 0011, 0110, 1100, 1001.
The a(3) = 8 strings are: 010101, 101010, 000111, 001110, 011100, 111000, 110001, 100011. (End)
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember;
          2^n+`if`(n::even and n>0, a(n/2), 0)
        end:
    seq(a(n), n=0..33);  # Alois P. Heinz, Jul 01 2025
  • PARI
    a(n)={if(n==0, 1, my(s=0); while(n%2==0, s+=2^n; n/=2); s + 2^n)} \\ Andrew Howroyd, Sep 22 2019
    
  • Python
    def A045654(n): return sum(1<<(n>>k) for k in range((~n & n-1).bit_length()+1)) if n else 1 # Chai Wah Wu, Jul 22 2024

Formula

a(0)=1, a(2n) = a(n)+2^(2n), a(2n+1) = 2^(2n+1). - Ralf Stephan, Jun 07 2003
G.f.: 1/(1-x) + sum(k>=0, t(1+2t-2t^2)/(1-t^2)/(1-2t), t=x^2^k). - Ralf Stephan, Aug 30 2003
For n >= 1, a(n) = Sum_{k=0..A007814(n)} 2^(n/2^k). - David W. Wilson, Jan 01 2012
Inverse Moebius transform of A045663. - Andrew Howroyd, Sep 15 2019
a(n) = 2*A127804(n-1) for n > 0. - Tilman Piesk, Jul 05 2025
a(n) = Sum_{k=1..n} 2 * n * A385665(n,k) / k. - Tilman Piesk, Jul 07 2025

A045662 Number of 2n-bead balanced binary strings of fundamental period 2n, rotationally equivalent to reverse.

Original entry on oeis.org

1, 2, 4, 6, 32, 50, 204, 266, 1024, 1224, 4900, 5522, 21600, 23998, 95508, 102750, 409600, 437546, 1747152, 1847522, 7380000, 7758870, 31027876, 32449826, 129752064, 135207500, 540783100, 561628620, 2246337184, 2326762742
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := If[n == 0, 1, 2n Sum[MoebiusMu[n/d] Binomial[d - Mod[d, 2], Quotient[d, 2]], {d, Divisors[n]}]];
    a /@ Range[0, 30] (* Jean-François Alcover, Sep 23 2019, from PARI *)
  • PARI
    a(n) = if(n<1, n==0, 2*n*sumdiv(n, d, moebius(n/d) * binomial(d-d%2, d\2))); \\ Andrew Howroyd, Sep 14 2019

Formula

a(n) = 2*n*A045680(n) for n > 0.
a(n) = 2*n*Sum_{d|n} mu(n/d) * binomial(2*floor(d/2), floor(d/2)) for n > 0. - Andrew Howroyd, Sep 14 2019

A045664 Number of 2n-bead balanced binary strings of fundamental period 2n, rotationally equivalent to reversed complement.

Original entry on oeis.org

1, 2, 4, 18, 48, 150, 324, 882, 1920, 4536, 9900, 22506, 48240, 106470, 227556, 490950, 1044480, 2228190, 4708368, 9961434, 20950800, 44037378, 92229588, 192937938, 402549120, 838860000, 1744617420, 3623864832, 7515733680
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := If[n == 0, 1, 2n Sum[MoebiusMu[n/d] 2^(d-1), {d, Divisors[n]}]];
    a /@ Range[0, 30] (* Jean-François Alcover, Sep 23 2019, from PARI *)
  • PARI
    a(n)={if(n<1, n==0, 2*n*sumdiv(n, d, moebius(n/d)*2^(d-1)))} \\ Andrew Howroyd, Sep 14 2019

Formula

For n >= 1, a(n) = n*A027375(n) = 2*n*A000740(n) = n^2*A001037(n).
a(n) = 2*n*Sum_{d|n} mu(n/d)*2^(d-1) for n > 0. - Andrew Howroyd, Sep 14 2019

A045665 Number of 2n-bead balanced binary strings of fundamental period 2n, rotationally equivalent to reverse, complement and reversed complement.

Original entry on oeis.org

1, 2, 4, 6, 16, 30, 36, 98, 128, 252, 300, 682, 720, 1638, 1764, 3690, 4096, 8670, 9072, 19418, 20400, 42630, 45012, 94162, 97920, 204600, 212940, 441504, 458640, 950214, 981900, 2031554, 2097152, 4323198, 4456380, 9174270, 9434880
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • PARI
    a(n)={if(n<1, n==0, n*sumdiv(n, d, if(d%2, moebius(d)*2^((n/d+1)\2))))} \\ Andrew Howroyd, Oct 01 2019

Formula

a(n) = 2*n*A045683(n) for n > 0.
a(n) = n * Sum_{d|n, d odd} mu(d) * 2^ceiling(n/(2*d)) for n > 0.

A045668 Number of 2n-bead balanced binary strings of fundamental period 2n, rotationally equivalent to complement, inequivalent to reverse and reversed complement.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 24, 28, 128, 252, 720, 1364, 3360, 6552, 14616, 29040, 61440, 122400, 253008, 504868, 1028160, 2054388, 4149288, 8294444, 16679040, 33349800, 66895920, 133775712, 267976800, 535920696, 1072758840, 2145452092
Offset: 0

Views

Author

Keywords

Crossrefs

Formula

It seems that a(n) = 4*n*A011948(n). - Ralf Stephan, Aug 30 2003
From Andrew Howroyd, Sep 14 2019: (Start)
a(n) = 2*n*A045686(n).
a(n) = A045663(n) - A045665(n). (End)

A045666 Number of 2n-bead balanced binary strings of fundamental period 2n, rotationally inequivalent to reverse, complement and reversed complement.

Original entry on oeis.org

0, 0, 0, 0, 0, 80, 384, 2352, 9856, 42840, 169280, 676720, 2630688, 10265216, 39777248, 154498200, 599556096, 2330826752, 9068386320, 35332969392, 137817005440, 538204062984, 2103970896544, 8233197139552, 32247052083840
Offset: 0

Views

Author

Keywords

Crossrefs

Formula

a(n) = 2*n*A045684(n).
a(n) = A007727(n) - A045662(n) - A045663(n) - A045664(n) + 2*A045665(n). - Andrew Howroyd, Sep 14 2019
Showing 1-6 of 6 results.