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
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)
-
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
-
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
-
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
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
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.
Cf.
A000031 counts the string classes.
-
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 *)
-
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
A045656
Number of 2n-bead balanced binary strings, rotationally equivalent to reverse, complement and reversed complement.
Original entry on oeis.org
1, 2, 6, 8, 22, 32, 48, 100, 150, 260, 336, 684, 784, 1640, 1868, 3728, 4246, 8672, 9372, 19420, 20752, 42736, 45700, 94164, 98832, 204632, 214584, 441764, 460524, 950216, 985968, 2031556, 2101398, 4323888, 4465056, 9174400, 9444988
Offset: 0
-
b[n_] := Module[{t = 0, r = n}, If[n == 0, 1, While[Mod[r, 2] == 0, r = r/2; t += 2^(r - 1)]; t + 2^Quotient[r, 2]]];
c[n_] := Sum[MoebiusMu[d]*d, {d, Divisors[n]}];
a[n_] := If[n == 0, 1, 2*Sum[c[n/d]*d*b[d], {d, Divisors[n]}]];
a /@ Range[0, 36] (* Jean-François Alcover, Sep 23 2019, from PARI *)
-
\\ here b(n) is A045674, c(n) is A023900.
b(n) = if(n<1, n==0, my(t=0, r=n); while(r%2==0, r=r/2; t+=2^(r-1)); t + 2^(r\2));
c(n) = {sumdiv(n,d, moebius(d)*d)}
a(n) = if(n<1, n==0, 2*sumdiv(n, d, c(n/d)*d*b(d))); \\ Andrew Howroyd, Sep 15 2019
A045657
Number of 2n-bead balanced binary strings, rotationally inequivalent to reverse, complement and reversed complement.
Original entry on oeis.org
0, 0, 0, 0, 0, 80, 384, 2352, 9856, 42840, 169360, 676720, 2631072, 10265216, 39779600, 154498280, 599565952, 2330826752, 9068429544, 35332969392, 137817174800, 538204065336, 2103971573264, 8233197139552, 32247054724768
Offset: 0
A045658
Number of 2n-bead balanced binary strings, rotationally equivalent to reverse, inequivalent to complement and reversed complement.
Original entry on oeis.org
0, 0, 0, 0, 16, 20, 168, 168, 912, 972, 4620, 4840, 21064, 22360, 93912, 99080, 406416, 428876, 1739220, 1828104, 7364236, 7716408, 30987704, 32355664, 129676104, 135002920, 540592520, 561188088, 2245972472, 2325812528
Offset: 0
Showing 1-5 of 5 results.
Comments