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.

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

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 3, 7, 8, 14, 15, 31, 30, 63, 63, 123, 128, 255, 252, 511, 510, 1015, 1023, 2047, 2040, 4092, 4095, 8176, 8190, 16383, 16365, 32767, 32768, 65503, 65535, 131061, 131040, 262143, 262143, 524223, 524280, 1048575, 1048509, 2097151
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A045665, A045674, A045680, A011947 (bisection?).

Programs

  • Maple
    A045683 := proc(p)
        option remember ;
        if p = 0 then
            return 1;
        end if;
        a := 2^(floor((p+1)/2)-1) ;
        for d in numtheory[divisors](p) do
            if d >1 and type(d,'odd') then
                a := a-procname(p/d) ;
            end if;
        end do:
        a ;
    end proc:
    seq(A045683(p),p=0..30) ; # [Iglesias eq 12] R. J. Mathar, Apr 15 2024
  • Mathematica
    b[0] = 1; b[n_] := Module[{t = 0, r = n}, While[EvenQ[r], r = Quotient[r, 2]; t += 2^(r-1)]; t + 2^Quotient[r, 2]];
    a[0] = 1; a[n_] :=  DivisorSum[n, MoebiusMu[n/#]*b[#]&];
    Table[a[n], {n, 0, 43}] (* Jean-François Alcover, Sep 30 2017, after Andrew Howroyd *)
  • PARI
    a(n)={if(n<1, n==0, sumdiv(n, d, if(d%2, moebius(d)*2^((n/d-1)\2))))} \\ Andrew Howroyd, Oct 01 2019

Formula

Moebius transform of A045674. - Andrew Howroyd, Sep 29 2017
From Andrew Howroyd, Oct 02 2019: (Start)
a(n) = Sum_{d|n, d odd} mu(d) * 2^floor((n/d-1)/2) for n > 0.
G.f.: 1 + Sum_{k>0} mu(2*k-1)*x^(2*k-1)*(1 + x^(2*k-1))/(1 - 2*x^(4*k-2)).
(End)

A011768 Number of Barlow packings that repeat after exactly n layers.

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 3, 6, 7, 16, 21, 43, 63, 129, 203, 404, 685, 1343, 2385, 4625, 8492, 16409, 30735, 59290, 112530, 217182, 415620, 803076, 1545463, 2990968, 5778267, 11201472, 21702686, 42140890, 81830744, 159139498, 309590883, 602935713, 1174779333, 2290915478, 4469734225, 8726815264
Offset: 1

Views

Author

N. J. A. Sloane and Michael OKeeffe (MOKeeffe(AT)asu.edu)

Keywords

Crossrefs

Programs

  • Maple
    with(numtheory); read transforms; M:=200;
    A:=proc(N,d) if d mod 3 = 0 then 2^(N/d) else (1/3)*(2^(N/d)+2*cos(Pi*N/d)); fi; end;
    E:=proc(N) if N mod 2 = 0 then N*2^(N/2) + add( did(N/2,d)*phi(2*d)*2^(N/(2*d)),d=1..N/2) else (N/3)*(2^((N+1)/2)+2*cos(Pi*(N+1)/2)); fi; end;
    PP:=proc(N) (1/(4*N))*(add(did(N,d)*phi(d)*A(N,d), d=1..N)+E(N)); end;
    for N from 1 to M do t1[N]:=PP(N); od:
    P:=proc(N) local s,d; s:=0; for d from 1 to N do if N mod d = 0 then s:=s+mobius(N/d)*t1[d]; fi; od: s; end; for N from 1 to M do lprint(N,P(N)); od: # N. J. A. Sloane, Aug 10 2006
  • Mathematica
    M = 40;
    did[m_, n_] := If[Mod[m, n] == 0, 1, 0];
    A[n_, d_] := If[Mod[d, 3] == 0, 2^(n/d), (1/3)(2^(n/d) + 2 Cos[Pi n/d])];
    EE[n_] := If[Mod[n, 2] == 0, n 2^(n/2) + Sum[did[n/2, d] EulerPhi[2d]* 2^(n/(2 d)), {d, 1, n/2}], (n/3)(2^((n+1)/2) + 2 Cos[Pi(n+1)/2])];
    PP[n_] := PP[n] = (1/(4n))(Sum[did[n, d] EulerPhi[d] A[n, d], {d, 1, n}] + EE[n]);
    P[n_] := Module[{s = 0, d}, For[d = 1, d <= n, d++, If[Mod[n, d] == 0, s += MoebiusMu[n/d] PP[d]]]; s];
    Array[P, M] (* Jean-François Alcover, Apr 21 2020, from Maple *)
  • PARI
    apply( {A011768(n)=A371991(n)+if(n%3, 0, n>3, A371992(n/3), 1)}, [1..42]) \\ M. F. Hasler, May 27 2025

Formula

a(n) = (A011946(n/4) + A011947((n-2)/4) + A011948(n/2) + A011949(n/2) + A011950((n+1)/2) + A011951(n/2) + A011952(n/2) + A011953(n)) + (A011954((n-3)/6) + A011955(n/6-1) + A011955(n/6) + A011956(n/3)), where the terms with non-integer indices are set to 0. For n > 3, the two parenthesized terms are resp. A371991(n) and A371992(n/3). - Andrey Zabolotskiy, Feb 14 2024 and May 27 2025

Extensions

More terms from N. J. A. Sloane, Aug 10 2006

A129629 Nonzero bisection of Moebius transform of A082392.

Original entry on oeis.org

1, 1, 3, 7, 14, 31, 63, 123, 255, 511, 1015, 2047, 4092, 8176, 16383, 32767, 65503, 131061, 262143, 524223, 1048575, 2097151, 4194162, 8388607, 16777208, 33554175, 67108863, 134217693, 268434943, 536870911, 1073741823
Offset: 1

Views

Author

Ralf Stephan, May 31 2007

Keywords

Comments

Possibly identical to A011947.

Programs

  • PARI
    A129629_upto(N=100)={ my( d=2*N+3, b=Vec( sum( k=0, exponent(d), (x^2^k)/(1-2*x^2^(k+1)),O(x^d)))); vector( N,i, sumdiv(i*2-1,k, moebius((i*2-1)/k)*b[k])) } \\  M. F. Hasler, May 03 2008, updated May 27 2025

Formula

a(n+1) = 2^n-A383182(n). - M. F. Hasler, May 03 2008; sequence number corrected by M. F. Hasler, May 27 2025
Showing 1-3 of 3 results.