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

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.

A011947 Number of Barlow packings with group P63/mmc(O) that repeat after 4n+2 layers.

Original entry on oeis.org

1, 1, 3, 7, 14, 31, 63, 123, 255, 511, 1015, 2047, 4092
Offset: 0

Views

Author

Keywords

Comments

Apparently identical to A129629.

References

  • T. J. McLarnan, The numbers of polytypes ..., Zeits. Krist. 155, 269-291 (1981).

Formula

Conjecture: a(n) = A045683(2n+1). - R. J. Mathar, Apr 15 2024

A011946 Number of Barlow packings with group P63/mmc(S) that repeat after 4n layers.

Original entry on oeis.org

1, 2, 3, 8, 15, 30, 63, 128, 252, 510, 1023, 2040, 4095, 8190, 16365, 32768, 65535, 131040, 262143, 524280, 1048509, 2097150, 4194303, 8388480, 16777200, 33554430, 67108608, 134217720, 268435455, 536870370, 1073741823, 2147483648, 4294966269, 8589934590
Offset: 1

Views

Author

Keywords

Comments

Conjecture: Mobius transform of A127804. - R. J. Mathar, Sep 14 2011
a(n) = n*A000048(n), where A000048(n) = number of n-bead necklaces with beads of 2 colors and primitive period n, when turning over is not allowed but the two colors can be interchanged. - Paul D. Hanna, Dec 21 2016

Examples

			G.f. = x + 2*x^2 + 3*x^3 + 8*x^4 + 15*x^5 + 30*x^6 + 63*x^7 + 128*x^8 + ...
		

Crossrefs

Cf. A195095 (same sequence).

Programs

  • Mathematica
    a[n_] := DivisorSum[n, MoebiusMu[#] * 2^(n/#-1) &, OddQ[#] &]; Array[a, 35] (* Amiram Eldar, Aug 29 2023 *)
  • PARI
    {a(n)=polcoeff(sum(m=1,n,-moebius(2*m)*x^m/(1-2*x^m+x*O(x^n))^1),n)}
    for(n=1,30,print1(a(n),", ")) \\ Paul D. Hanna, Sep 08 2011
    
  • PARI
    {a(n) =  sumdiv(n,d, if(d%2==1, moebius(d) * 2^(n/d-1) ) )}
    for(n=1,30,print1(a(n),", ")) \\ Paul D. Hanna, Sep 08 2011
  • Python
    a = lambda n: sum([sympy.mobius(d)*(2**(sympy.floor((2*n//d+1)/2)-1)) for d in sympy.divisors(n) if d%2==1])
    

Formula

From Paul D. Hanna, Sep 08 2011 (merged from duplicate A195095 Feb 06 2024): (Start)
G.f.: Sum_{n>=1} -moebius(2*n)*x^n/(1 - 2*x^n).
a(2^n) = 2^(2^n - 1).
a(p) = 2^(p-1) for odd prime p.
(End)
a(n) = floor(2^(n-1)/n)*n unless n=3k, k>4. - M. F. Hasler, Sep 08 2011
G.f.: Sum_{n>=1} moebius(2*n-1)*x^(2*n-1)/(1 - 2*x^(2*n-1)). - Mamuka Jibladze, Dec 04 2016
a(n) = Sum_{d|n, d odd} moebius(d) * 2^(n/d - 1), where moebius(n) = A008683(n). - Paul D. Hanna, Dec 21 2016, Bartosz Naskrecki, Jan 06 2024
Conjecture: a(n) = A045683(2n). - R. J. Mathar, Apr 15 2024

Extensions

More terms from Bartosz Naskrecki, Jan 06 2024

A011951 Number of Barlow packings with group P3(bar)m1(S) that repeat after 2n layers.

Original entry on oeis.org

0, 0, 0, 0, 2, 3, 9, 16, 39, 75, 165, 318, 672, 1323, 2703, 5376, 10880, 21663, 43605, 87040, 174564, 348843, 698709, 1396680, 2795518, 5589675, 11183325, 22364160, 44736512, 89467320, 178951509, 357892096, 715816464, 1431612075, 2863289674, 5726534688, 11453202432
Offset: 1

Views

Author

Keywords

Programs

  • Maple
    # eq (6) in Iglesias Z Krist. 221 (2006)
    b := proc(p,q)
        local d;
        a := 0 ;
        for d from 1 to min(p,q) do
            if modp(p,d)=0 and modp(q,d)=0 then
                ph := floor(p/2/d) ;
                qh := floor(q/2/d) ;
                a := a+numtheory[mobius](d)*binomial(ph+qh,ph) ;
            end if ;
        end do:
        a ;
    end proc:
    # eq (17) in Iglesias Z Krist. 221 (2006)
    bt := proc(p,q)
        if type(p+q,'odd') then
            b(p,q) ;
        else
            0;
        end if;
    end proc:
    # corrected eq (15) in Iglesias Z Krist. 221 (2006),  d|(p/2) and d|(q/2)
    bbtemp := proc(p,q)
        local d,ph,qh;
        a := 0 ;
        for d from 1 to min(p,q) do
            if modp(p,2*d)=0 and modp(q,2*d)=0 then
                ph := p/2/d ;
                qh := q/2/d ;
                a := a+numtheory[mobius](d)*binomial(ph+qh,ph) ;
            end if ;
        end do:
        a ;
    end proc:
    # eq (16) in Iglesias Z Krist. 221 (2006)
    bb := proc(p,q)
        if type(p,'even') and type(q,'even') then
            ( bbtemp(p,q)-bt(p/2,q/2) )/2 ;
        else
            0 ;
        end if;
    end proc:
    # eq (25) in Iglesias Z Krist. 221 (2006)
    FracR := proc(Phalf)
        if type(Phalf,'even') then
            (bb(Phalf,Phalf)-A045683(Phalf))/2 ;
        else
            0;
        end if;
    end proc:
    # eq (24) in Iglesias Z Krist. 221 (2006)
    A011951 := proc(n)
        local a,p,q,P ;
        P := 2*n ;
        a := FracR(P/2) ;
        for q from 0 to P do
            p := P-q ;
            if modp(p-q,3) = 0 and p < q then
                a := a+bb(p,q) ;
            end if;
        end do:
        a ;
    end proc:
    seq(A011951(n),n=1..40 ) ; # R. J. Mathar, Apr 15 2024
  • PARI
    apply( {A011951(n)=my(P=2*n, b(p, q, f=1)=sum(d=1, min(p, q), if(p%(d*f)+q%(d*f)==0, moebius(d)*binomial(q\2\d+p\2\d, p\2\d))), bb(p,q)=if(p%2+q%2==0, b(p,q,2)-if((p+q)%4, b(p/2,q/2)))); sum(q=n+1, P, if(q%2==0 && (n-q)*2%3==0, bb(P-q,q)),if(n%2==0,bb(n,n)/2-A045683(n)))/2}, [1..44]) \\ M. F. Hasler, Jun 03 2025

Extensions

More terms from Sean A. Irvine, May 26 2025

A011952 Number of Barlow packings with group P3(bar)m1(O) that repeat after 2n layers.

Original entry on oeis.org

2, 3, 8, 16, 40, 73, 165, 320, 666, 1323, 2709, 5364, 10880, 21675, 43577, 87040, 174590, 348787, 698709, 1396736, 2795400, 5589672, 11183445, 22363920, 44736510, 89467563, 178951005, 357892096, 715816960, 1431611083, 2863289685, 5726535661, 11453200416
Offset: 4

Views

Author

Keywords

Programs

  • Maple
    # eq (6) in Iglesias Z Krist. 221 (2006)
    b := proc(p,q)
        local d;
        a := 0 ;
        for d from 1 to min(p,q) do
            if modp(p,d)=0 and modp(q,d)=0 then
                ph := floor(p/2/d) ;
                qh := floor(q/2/d) ;
                a := a+numtheory[mobius](d)*binomial(ph+qh,ph) ;
            end if ;
        end do:
        a ;
    end proc:
    # eq (17) in Iglesias Z Krist. 221 (2006)
    bt := proc(p,q)
        if type(p+q,'odd') then
            b(p,q) ;
        else
            0;
        end if;
    end proc:
    # corrected eq (15) in Iglesias Z Krist. 221 (2006),  d|(p/2) and d|(q/2)
    bbtemp := proc(p,q)
        local d,ph,qh;
        a := 0 ;
        for d from 1 to min(p,q) do
            if modp(p,2*d)=0 and modp(q,2*d)=0 then
                ph := p/2/d ;
                qh := q/2/d ;
                a := a+numtheory[mobius](d)*binomial(ph+qh,ph) ;
            end if ;
        end do:
        a ;
    end proc:
    # eq (16) in Iglesias Z Krist. 221 (2006)
    bb := proc(p,q)
        if type(p,'even') and type(q,'even') then
            ( bbtemp(p,q)-bt(p/2,q/2) )/2 ;
        else
            0 ;
        end if;
    end proc:
    tt := proc(p,q)
        if type(p+q,'odd') then
            0 ;
        else
            b(p,q)-bb(p,q);
        end if;
    end proc:
    # eq (28) in Iglesias Z Krist. 221 (2006)
    FracS := proc(Phalf)
        if type(Phalf,'even') then
            tt(Phalf,Phalf)/2 ;
        else
            (tt(Phalf,Phalf)-A045683(Phalf))/2 ;
        end if;
    end proc:
    # eq (27)
    A011952 := proc(n)
        local a,p,q,P ;
        P := 2*n ;
        if type(P,'even') then
            a := FracS(P/2) ;
            for q from 0 to P do
                p := P-q ;
                if modp(p-q,3) = 0 and p < q then
                    a := a+tt(p,q) ;
                end if;
            end do:
            a ;
        else
            0;
        end if;
    end proc:
    seq(A011952(n),n=4..40) ;# R. J. Mathar, Apr 15 2024

Extensions

More terms from Sean A. Irvine, May 26 2025

A045684 Number of 2n-bead balanced binary necklaces of fundamental period 2n which are inequivalent to their reverse, complement and reversed complement.

Original entry on oeis.org

0, 0, 0, 0, 0, 8, 32, 168, 616, 2380, 8464, 30760, 109612, 394816, 1420616, 5149940, 18736128, 68553728, 251899620, 929814984, 3445425136, 12814382452, 47817520376, 178982546512, 671813585080, 2528191984496, 9536849432000
Offset: 0

Views

Author

Keywords

Comments

The number of length 2n balanced binary Lyndon words is A022553(n) and the number which are equivalent to their reverse, complement and reversed complement are respectively A045680(n), A000048(n) and A000740(n). - Andrew Howroyd, Sep 29 2017

Crossrefs

Programs

  • Mathematica
    a22553[n_] := If[n == 0, 1, Sum[MoebiusMu[n/d]*Binomial[2d, d], {d, Divisors[n]}]/(2n)];
    a45680[n_] := If[n == 0, 1, DivisorSum[n, MoebiusMu[n/#] Binomial[# - Mod[#, 2], Quotient[#, 2]] &]];
    a48[n_] := If[n == 0, 1, Total[MoebiusMu[#]*2^(n/#)& /@ Select[Divisors[n], OddQ]]/(2n)];
    a740[n_] := Sum[MoebiusMu[n/d]*2^(d - 1), {d, Divisors[n]}];
    b[n_] := Module[{t = 0, r = n}, If[n == 0, 1, While[EvenQ[r], r = Quotient[r, 2]; t += 2^(r - 1)]]; t + 2^Quotient[r, 2]];
    a45683[n_] := If[n == 0, 1, DivisorSum[n, MoebiusMu[n/#]*b[#] &]];
    a[n_] := If[n == 0, 0, a22553[n] - a45680[n] - a48[n] - a740[n] + 2 a45683[n]];
    a /@ Range[0, 100] (* Jean-François Alcover, Sep 23 2019 *)

Formula

From Andrew Howroyd, Sep 28 2017: (Start)
Moebius transform of A045675.
a(n) = A022553(n) - A045680(n) - A000048(n) - A000740(n) + 2*A045683(n).
(End)

A045687 Number of 2n-bead balanced binary necklaces of fundamental period 2n which are equivalent to their reversed complement, but are not equivalent to their reverse and complement.

Original entry on oeis.org

0, 0, 0, 2, 4, 12, 24, 56, 112, 238, 480, 992, 1980, 4032, 8064, 16242, 32512, 65280, 130536, 261632, 523260, 1047494, 2095104, 4192256, 8384400, 16773108, 33546240, 67100432, 134201340, 268419072, 536837640, 1073709056, 2147418112
Offset: 0

Views

Author

Keywords

Comments

The number of length 2n balanced binary Lyndon words which are equivalent to their reversed complement is A000740(n) and the number which are equivalent to their reverse, complement and reversed complement is A045683(n). - Andrew Howroyd, Sep 28 2017

Crossrefs

Programs

  • Mathematica
    a740[n_] := DivisorSum[n, MoebiusMu[n/#]*2^(#-1)&];
    a45674[0] = 1; a45674[n_] := Module[{t = 0, r = n}, While[EvenQ[r], r = Quotient[r, 2]; t += 2^(r-1)]; t + 2^Quotient[r, 2]];
    a45683[0] = 1; a45683[n_] := DivisorSum[n, MoebiusMu[n/#]*a45674[#]&];
    a[0] = 0; a[n_] := a740[n] - a45683[n];
    Table[a[n], {n, 0, 32}] (* Jean-François Alcover, Sep 30 2017, after Andrew Howroyd *)

Formula

From Andrew Howroyd, Sep 28 2017: (Start)
Moebius transform of A045678.
a(n) = A000740(n) - A045683(n).
(End)

Extensions

Incorrect formulas and comments removed by Andrew Howroyd, Sep 28 2017

A045685 Number of 2n-bead balanced binary necklaces of fundamental period 2n which are equivalent to their reverse, but not equivalent to their complement and reversed complement.

Original entry on oeis.org

0, 0, 0, 0, 2, 2, 14, 12, 56, 54, 230, 220, 870, 860, 3348, 3302, 12672, 12614, 48280, 48108, 183990, 183720, 704156, 703384, 2701128, 2700058, 10395580, 10392354, 40104974, 40100216, 155097460, 155084752, 601034752, 601014634, 2333527814
Offset: 0

Views

Author

Keywords

Comments

The number of length 2n balanced binary Lyndon words which are equivalent to their reverse is A045680(n) and the number which are equivalent to their reverse, complement and reversed complement is A045683(n). - Andrew Howroyd, Sep 28 2017

Crossrefs

Formula

From Andrew Howroyd, Sep 28 2017: (Start)
Moebius transform of A045676.
a(n) = A045680(n) - A045683(n).
(End)

A045686 Number of 2n-bead balanced binary necklaces of fundamental period 2n which are equivalent to their complement, but not equivalent to their reverse and their reversed complement.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 2, 2, 8, 14, 36, 62, 140, 252, 522, 968, 1920, 3600, 7028, 13286, 25704, 48914, 94302, 180314, 347480, 666996, 1286460, 2477328, 4785300, 9240012, 17879314, 34604066, 67076096, 130084990, 252579600, 490722342, 954306080
Offset: 0

Views

Author

Keywords

Comments

The number of length 2n balanced binary Lyndon words which are equivalent to their complement is A000048(n) and the number which are equivalent to their reverse, complement and reversed complement is A045683(n). - Andrew Howroyd, Sep 28 2017

Crossrefs

Programs

  • Mathematica
    a48[n_] := Total[MoebiusMu[#]*2^(n/#)& /@ Select[Divisors[n], OddQ]]/(2n);
    b[n_] := Module[{t = 0, r = n}, While[EvenQ[r], r = Quotient[r, 2]; t += 2^(r - 1)]; t + 2^Quotient[r, 2]];
    a45683[n_] := DivisorSum[n, MoebiusMu[n/#]*b[#]&];
    a[n_] := If[n == 0, 0, a48[n] - a45683[n]];
    a /@ Range[0, 36] (* Jean-François Alcover, Sep 23 2019, after Andrew Howroyd *)

Formula

From Andrew Howroyd, Sep 28 2017: (Start)
Moebius transform of A045677.
a(n) = A000048(n) - A045683(n).
(End)
Showing 1-9 of 9 results.