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.

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

Original entry on oeis.org

1, 2, 6, 20, 54, 152, 348, 884, 1974, 4556, 10056, 22508, 48636, 106472, 228444, 491120, 1046454, 2228192, 4713252, 9961436, 20960904, 44038280, 92252100, 192937940, 402599676, 838860152, 1744723896, 3623869388, 7515962172
Offset: 0

Views

Author

Keywords

Comments

a(n) is the number of ordered pairs (a,b) of length n binary sequences such that a and b are equivalent by rotational symmetry. - Geoffrey Critzer, Dec 31 2011
a(n) is the weighted sum of binary strings of length n by their number of distinct images by rotation. There is a natural correspondence between the first 2^(n-1) sequences (starting with a 0) and the 2^(n-1) starting with a 1 by inversion. There is also an internal correspondance by order inversion. - Olivier Gérard, Jan 01 2011
The number of k-circulant n X n (0,1) matrices, which means the number of n X n binary matrices where rows from the 2nd row on are obtained from the preceding row by a cyclic shift by k columns for some 0 <= k < n. - R. J. Mathar, Mar 11 2017

Examples

			a(2)= 6 because there are 6 such ordered pairs of length 2 binary sequences: (00,00),(11,11),(01,01),(10,10),(01,10),(10,01).
a(3)= 20 because the classes of 3-bit strings are 1*(000), 3*(001,010,100), 3*(011,110,101), 1*(111) = 1 + 9 + 9 + 1.
		

Crossrefs

Cf. A000031 counts the string classes.

Programs

  • Mathematica
    f[n_] := 2*Plus @@ Table[ Length[ Union[ NestList[ RotateLeft, IntegerDigits[b, 2, n], n - 1]]], {b, 0, 2^(n - 1) - 1}]; f[0] = 1; Array[f, 21, 0] (* Olivier Gérard, Jan 01 2012 *)
  • PARI
    c(n)={sumdiv(n,d, moebius(d)*d)} \\ A023900
    a(n)={if(n<1, n==0, sumdiv(n, d, c(n/d)*d*2^d))} \\ Andrew Howroyd, Sep 15 2019

Formula

For n >= 1, a(n) = Sum_{d|n} A045664(d) = Sum_{d|n} d*A027375(d) = Sum_{d|n} d^2*A001037(d).
a(n) = Sum_{d|n} A023900(n/d)*d*2^d. - Andrew Howroyd, Sep 15 2019

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

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

Original entry on oeis.org

1, 2, 4, 6, 16, 30, 60, 126, 256, 504, 1020, 2046, 4080, 8190, 16380, 32730, 65536, 131070, 262080, 524286, 1048560, 2097018, 4194300, 8388606, 16776960, 33554400, 67108860, 134217216, 268435440, 536870910, 1073740740, 2147483646
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := If[n==0, 1, 2n Total[MoebiusMu[#]*2^(n/#)& /@ Select[Divisors[n], OddQ]]/(2n)];
    a /@ Range[0, 31] (* Jean-François Alcover, Sep 23 2019 *)
  • PARI
    a(n)={if(n<1, n==0, sumdiv(n, d, if(d%2, moebius(d)*2^(n/d))))} \\ Andrew Howroyd, Sep 14 2019
    
  • Python
    from sympy import mobius, divisors
    def A045663(n): return sum(mobius(d)<>(~n&n-1).bit_length(),generator=True)) if n else 1 # Chai Wah Wu, Jul 22 2024

Formula

a(n) = 2*n*A000048(n) = n*A064355(n) for n > 0.
a(n) = Sum{d|n, d odd} mu(d) * 2^(n/d) 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.

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

Original entry on oeis.org

0, 0, 0, 12, 32, 120, 288, 784, 1792, 4284, 9600, 21824, 47520, 104832, 225792, 487260, 1040384, 2219520, 4699296, 9942016, 20930400, 43994748, 92184576, 192843776, 402451200, 838655400, 1744404480, 3623423328, 7515275040
Offset: 0

Views

Author

Keywords

Crossrefs

Formula

a(n) = 2*n*A045687(n).
a(n) = A045664(n) - A045665(n). - Andrew Howroyd, Sep 14 2019

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.