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-10 of 160 results. Next

A066656 a(n) = A000031(n) - A001037(n).

Original entry on oeis.org

0, 0, 2, 2, 3, 2, 5, 2, 6, 4, 9, 2, 17, 2, 21, 10, 36, 2, 70, 2, 111, 22, 189, 2, 382, 8, 633, 60, 1185, 2, 2301, 2, 4116, 190, 7713, 26, 14940, 2, 27597, 634, 52518, 2, 101051, 2, 190749, 2248, 364725, 2, 703332, 20, 1342284, 7714, 2581431, 2, 4985610, 194
Offset: 0

Views

Author

Randall L Rathbun, Jan 10 2002

Keywords

Comments

This is the number of imprimitive (periodic) n-bead necklaces with 2 colors when turning over is not allowed. a(p)=2 for prime p. Presumably, a(n)=2*A115118(n) for odd n. - Valery A. Liskovets, Jan 17 2006

Crossrefs

Programs

  • Mathematica
    mx=40; f[x_]:=Sum[(MoebiusMu[i]-EulerPhi[i])Log[1-2*x^i]/i,{i,1,mx}];
    CoefficientList[Series[f[x],{x,0,mx}],x] (* Herbert Kociemba, Nov 25 2016 *)
  • PARI
    a(n) = if (n==0, 0, sumdiv(n, d, (eulerphi(d)*2^(n/d) - moebius(n/d)*2^d))/n); \\ Michel Marcus, May 25 2022

Formula

a(0) = 0; a(n) = (1/n)*Sum_{d|n} (phi(d)*2^(n/d) - mu(n/d)*2^d). [corrected by Michel Marcus, May 25 2022]
G.f.: Sum_{i>=1} (mu(i) - phi(i))*log(1 - 2*x^i)/i. - Herbert Kociemba, Nov 25 2016

A209970 a(n) = 2^n - A000031(n).

Original entry on oeis.org

0, 0, 1, 4, 10, 24, 50, 108, 220, 452, 916, 1860, 3744, 7560, 15202, 30576, 61420, 123360, 247542, 496692, 996088, 1997272, 4003558, 8023884, 16077964, 32212248, 64527436, 129246660, 258847876, 518358120, 1037949256, 2078209980, 4160747500, 8329633416, 16674575056, 33378031536
Offset: 0

Views

Author

David Applegate and N. J. A. Sloane, Mar 17 2012

Keywords

Comments

a(n) is also the number of 2-divided binary words of length n (see A210109 for definition, see A209919 for further details).
This is a special case of a more general result: Let A={0,1,...,s-1} be an alphabet of size s. Let A* = set of words over A. Let < denote lexicographic order on A*. Let f be the morphism on A* defined by i -> s-i for i in A.
Theorem: Let d(n) be the number of 2-divided words in A* of length n, and let b(n) be the number of rotationally inequivalent necklaces with n beads each in A. Then d(n)+b(n)=s^n.
Proof: Let w in A* have length n. If w is <= all of its cyclic shifts then w contributes to the b(n) count. Otherwise w = uv with vu < uv. But then f(w)=f(u)f(v) with f(u)f(v) < f(v)f(u) is 2-divided, and w contributes to the count in d(n). QED
Cor.: A000031(n) + A209970(n) = 2^n, A001867(n) + A210323(n) = 3^n, A001868(n) + A210424(n) = 4^n.

Crossrefs

A100447 Bisection of A000031.

Original entry on oeis.org

2, 4, 8, 20, 60, 188, 632, 2192, 7712, 27596, 99880, 364724, 1342184, 4971068, 18512792, 69273668, 260301176, 981706832, 3714566312, 14096303344, 53634713552, 204560302844, 781874936816, 2994414645860, 11488774559636
Offset: 0

Views

Author

N. J. A. Sloane, Nov 21 2004

Keywords

Crossrefs

Cf. A000031, A100446. Equals 2*A026119.

Programs

  • Maple
    with(numtheory):seq((1/(2*n+1))*add(phi(d)*2^((2*n+1)/d),d=divisors(2*n+1)),n=0..30); (C. Ronaldo)

Extensions

More terms from C. Ronaldo (aga_new_ac(AT)hotmail.com), Jan 19 2005

A054058 Inverse Moebius transform of A000031 (starting at term 0).

Original entry on oeis.org

1, 3, 4, 7, 7, 14, 15, 27, 40, 69, 109, 206, 353, 649, 1192, 2219, 4117, 7762, 14603, 27669, 52506, 99991, 190747, 364950, 699259, 1342539, 2581468, 4971721, 9587581, 18514054, 35792569, 69275887, 134219908, 260305295, 505294149
Offset: 0

Views

Author

N. J. A. Sloane, Apr 29 2000

Keywords

Crossrefs

Cf. A054079.

A054079 Moebius transform of A000031 (starting at term 0).

Original entry on oeis.org

1, 1, 2, 2, 5, 4, 13, 16, 33, 53, 107, 178, 351, 617, 1174, 2172, 4115, 7671, 14601, 27534, 52472, 99771, 190745, 364520, 699246, 1341831, 2581392, 4970434, 9587579, 18511552, 35792567, 69271476, 134219686, 260297059, 505294109
Offset: 0

Views

Author

N. J. A. Sloane, Apr 29 2000

Keywords

Crossrefs

Cf. A054058.

A100446 Bisection of A000031.

Original entry on oeis.org

1, 3, 6, 14, 36, 108, 352, 1182, 4116, 14602, 52488, 190746, 699252, 2581428, 9587580, 35792568, 134219796, 505294128, 1908881900, 7233642930, 27487816992, 104715443852, 399822505524, 1529755490574, 5864062367252, 22517998808028
Offset: 0

Views

Author

N. J. A. Sloane, Nov 21 2004

Keywords

Crossrefs

Extensions

More terms from Joshua Zucker, May 12 2006

A322037 a(n) = 2^b(n), where b(n) = A000031(n).

Original entry on oeis.org

2, 4, 8, 16, 64, 256, 16384, 1048576, 68719476736, 1152921504606846976, 324518553658426726783156020576256, 392318858461667547739736838950479151006397215279002157056
Offset: 0

Views

Author

N. J. A. Sloane, Nov 29 2018

Keywords

Comments

The core sequence A000031 has numerous interpretations.
a(n) is the number of n-variable rotation symmetric Boolean functions (or RotS Boolean functions).

Crossrefs

Cf. A000031.

A054185 Binomial transform of A000031.

Original entry on oeis.org

1, 3, 8, 20, 49, 119, 290, 714, 1781, 4507, 11580, 30208, 79941, 214327, 581292, 1592496, 4400765, 12251895, 34326566, 96694866, 273639617, 777444807, 2216341466, 6336999666, 18165573373, 52191551315, 150254448730, 433350470586
Offset: 0

Views

Author

N. J. A. Sloane, Apr 29 2000

Keywords

Crossrefs

Cf. A000031.

Formula

G.f.: (1/(1 - x)) * (1 - Sum_{k>=1} phi(k)*log(1 - 2*(x/(1 - x))^k)/k). - Ilya Gutkovskiy, Nov 12 2019

A001037 Number of degree-n irreducible polynomials over GF(2); number of n-bead necklaces with beads of 2 colors when turning over is not allowed and with primitive period n; number of binary Lyndon words of length n.

Original entry on oeis.org

1, 2, 1, 2, 3, 6, 9, 18, 30, 56, 99, 186, 335, 630, 1161, 2182, 4080, 7710, 14532, 27594, 52377, 99858, 190557, 364722, 698870, 1342176, 2580795, 4971008, 9586395, 18512790, 35790267, 69273666, 134215680, 260300986, 505286415, 981706806, 1908866960, 3714566310, 7233615333, 14096302710, 27487764474
Offset: 0

Views

Author

Keywords

Comments

Also dimensions of free Lie algebras - see A059966, which is essentially the same sequence.
This sequence also represents the number N of cycles of length L in a digraph under x^2 seen modulo a Mersenne prime M_q=2^q-1. This number does not depend on q and L is any divisor of q-1. See Theorem 5 and Corollary 3 of the Shallit and Vasiga paper: N=sum(eulerphi(d)/order(d,2)) where d is a divisor of 2^(q-1)-1 such that order(d,2)=L. - Tony Reix, Nov 17 2005
Except for a(0) = 1, Bau-Sen Du's [1985/2007] Table 1, p. 6, has this sequence as the 7th (rightmost) column. Other columns of the table include (but are not identified as) A006206-A006208. - Jonathan Vos Post, Jun 18 2007
"Number of binary Lyndon words" means: number of binary strings inequivalent modulo rotation (cyclic permutation) of the digits and not having a period smaller than n. This provides a link to A103314, since these strings correspond to the inequivalent zero-sum subsets of U_m (m-th roots of unity) obtained by taking the union of U_n (n|m) with 0 or more U_d (n | d, d | m) multiplied by some power of exp(i 2Pi/n) to make them mutually disjoint. (But not all zero-sum subsets of U_m are of that form.) - M. F. Hasler, Jan 14 2007
Also the number of dynamical cycles of period n of a threshold Boolean automata network which is a quasi-minimal positive circuit of size a multiple of n and which is updated in parallel. - Mathilde Noual (mathilde.noual(AT)ens-lyon.fr), Feb 25 2009
Also, the number of periodic points with (minimal) period n in the iteration of the tent map f(x):=2min{x,1-x} on the unit interval. - Pietro Majer, Sep 22 2009
Number of distinct cycles of minimal period n in a shift dynamical system associated with a totally disconnected hyperbolic iterated function system (see Barnsley link). - Michel Marcus, Oct 06 2013
From Jean-Christophe Hervé, Oct 26 2014: (Start)
For n > 0, a(n) is also the number of orbits of size n of the transform associated to the Kolakoski sequence A000002 (and this is true for any map with 2^n periodic points of period n). The Kolakoski transform changes a sequence of 1's and 2's by the sequence of the lengths of its runs. The Kolakoski sequence is one of the two fixed points of this transform, the other being the same sequence without the initial term. A025142 and A025143 are the periodic points of the orbit of size 2. A027375(n) = n*a(n) gives the number of periodic points of minimal period n.
For n > 1, this sequence is equal to A059966 and to A060477, and for n = 1, a(1) = A059966(1)+1 = A060477(1)-1; this because the n-th term of all 3 sequences is equal to (1/n)*sum_{d|n} mu(n/d)*(2^d+e), with e = -1/0/1 for resp. A059966/this sequence/A060477, and sum_{d|n} mu(n/d) equals 1 for n = 1 and 0 for all n > 1. (End)
Warning: A000031 and A001037 are easily confused, since they have similar formulas.
From Petros Hadjicostas, Jul 14 2020: (Start)
Following Kam Cheong Au (2020), let d(w,N) be the dimension of the Q-span of weight w and level N of colored multiple zeta values (CMZV). Here Q are the rational numbers.
Deligne's bound says that d(w,N) <= D(w,N), where 1 + Sum_{w >= 1} D(w,N)*t^w = (1 - a*t + b*t^2)^(-1) when N >= 3, where a = phi(N)/2 + omega(N) and b = omega(N) - 1 (with omega(N) = A001221(N) being the number of distinct primes of N).
For N = 3, a = phi(3)/2 + omega(3) = 2/2 + 1 = 2 and b = omega(3) - 1 = 0. It follows that D(w, N=3) = A000079(w) = 2^w.
For some reason, Kam Cheong Au (2020) assumes Deligne's bound is tight, i.e., d(w,N) = D(w,N). He sets Sum_{w >= 1} c(w,N)*t^w = log(1 + Sum_{w >= 1} d(w,N)*t^w) = log(1 + Sum_{w >= 1} D(w,N)*t^w) = -log(1 - a*t + b*t^2) for N >= 3.
For N = 3, we get that c(w, N=3) = A000079(w)/w = 2^w/w.
He defines d*(w,N) = Sum_{k | w} (mu(k)/k)*c(w/k,N) to be the "number of primitive constants of weight w and level N". (Using the terminology of A113788, we may perhaps call d*(w,N) the number of irreducible colored multiple zeta values at weight w and level N.)
Using standard techniques of the theory of g.f.'s, we can prove that Sum_{w >= 1} d*(w,N)*t^w = Sum_{s >= 1} (mu(s)/s) Sum_{k >= 1} c(k,N)*(t^s)^k = -Sum_{s >= 1} (mu(s)/s)*log(1 - a*t^s + b*t^(2*s)).
For N = 3, we saw that a = 2 and b = 0, and hence d*(w, N=3) = a(w) = Sum_{k | w} (mu(k)/k) * 2^(w/k) / (w/k) = (1/w) * Sum_{k | w} mu(k) * 2^(w/k) for w >= 1. See Table 1 on p. 6 in Kam Cheong Au (2020). (End)

Examples

			Binary strings (Lyndon words, cf. A102659):
a(0) = 1 = #{ "" },
a(1) = 2 = #{ "0", "1" },
a(2) = 1 = #{ "01" },
a(3) = 2 = #{ "001", "011" },
a(4) = 3 = #{ "0001", "0011", "0111" },
a(5) = 6 = #{ "00001", "00011", "00101", "00111", "01011", "01111" }.
		

References

  • Michael F. Barnsley, Fractals Everywhere, Academic Press, San Diego, 1988, page 171, Lemma 3.
  • E. R. Berlekamp, Algebraic Coding Theory, McGraw-Hill, NY, 1968, p. 84.
  • E. L. Blanton, Jr., S. P. Hurd and J. S. McCranie. On the digraph defined by squaring mod m, when m has primitive roots. Congr. Numer. 82 (1991), 167-177.
  • P. J. Freyd and A. Scedrov, Categories, Allegories, North-Holland, Amsterdam, 1990. See 1.925.
  • M. Lothaire, Combinatorics on Words, Addison-Wesley, Reading, MA, 1983, pp. 65, 79.
  • Robert M. May, "Simple mathematical models with very complicated dynamics." Nature, Vol. 261, June 10, 1976, pp. 459-467; reprinted in The Theory of Chaotic Attractors, pp. 85-93. Springer, New York, NY, 2004. The sequences listed in Table 2 are A000079, A027375, A000031, A001037, A000048, A051841. - N. J. A. Sloane, Mar 17 2019
  • Guy Melançon, Factorizing infinite words using Maple, MapleTech Journal, vol. 4, no. 1, 1997, pp. 34-42, esp. p. 36.
  • M. R. Nester, (1999). Mathematical investigations of some plant interaction designs. PhD Thesis. University of Queensland, Brisbane, Australia. [See A056391 for pdf file of Chap. 2]
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence in entries N0046 and N0287).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Column 2 of A074650.
Row sums of A051168, which gives the number of Lyndon words with fixed number of zeros and ones.
Euler transform is A000079.
See A058943 and A102569 for initial terms. See also A058947, A011260, A059966.
Irreducible over GF(2), GF(3), GF(4), GF(5), GF(7): A058943, A058944, A058948, A058945, A058946. Primitive irreducible over GF(2), GF(3), GF(4), GF(5), GF(7): A058947, A058949, A058952, A058950, A058951.
Cf. A000031 (n-bead necklaces but may have period dividing n), A014580, A046211, A046209, A006206-A006208, A038063, A060477, A103314.
See also A102659 for the list of binary Lyndon words themselves.

Programs

  • Haskell
    a001037 0 = 1
    a001037 n = (sum $ map (\d -> (a000079 d) * a008683 (n `div` d)) $
                           a027750_row n) `div` n
    -- Reinhard Zumkeller, Feb 01 2013
    
  • Maple
    with(numtheory): A001037 := proc(n) local a,d; if n = 0 then RETURN(1); else a := 0: for d in divisors(n) do a := a+mobius(n/d)*2^d; od: RETURN(a/n); fi; end;
  • Mathematica
    f[n_] := Block[{d = Divisors@ n}, Plus @@ (MoebiusMu[n/d]*2^d/n)]; Array[f, 32]
  • PARI
    A001037(n)=if(n>1,sumdiv(n,d,moebius(d)*2^(n/d))/n,n+1) \\ Edited by M. F. Hasler, Jan 11 2016
    
  • PARI
    {a(n)=polcoeff(1-sum(k=1,n,moebius(k)/k*log(1-2*x^k+x*O(x^n))),n)} \\ Paul D. Hanna, Oct 13 2010
    
  • PARI
    a(n)=if(n>1,my(s);forstep(i=2^n+1,2^(n+1),2,s+=polisirreducible(Mod(1,2) * Pol(binary(i))));s,n+1) \\ Charles R Greathouse IV, Jan 26 2012
    
  • Python
    from sympy import divisors, mobius
    def a(n): return sum(mobius(d) * 2**(n//d) for d in divisors(n))/n if n>1 else n + 1 # Indranil Ghosh, Apr 26 2017

Formula

For n >= 1:
a(n) = (1/n)*Sum_{d | n} mu(n/d)*2^d.
A000031(n) = Sum_{d | n} a(d).
2^n = Sum_{d | n} d*a(d).
a(n) = A027375(n)/n.
a(n) = A000048(n) + A051841(n).
For n > 1, a(n) = A059966(n) = A060477(n).
G.f.: 1 - Sum_{n >= 1} moebius(n)*log(1 - 2*x^n)/n, where moebius(n) = A008683(n). - Paul D. Hanna, Oct 13 2010
From Richard L. Ollerton, May 10 2021: (Start)
For n >= 1:
a(n) = (1/n)*Sum_{k=1..n} mu(gcd(n,k))*2^(n/gcd(n,k))/phi(n/gcd(n,k)).
a(n) = (1/n)*Sum_{k=1..n} mu(n/gcd(n,k))*2^gcd(n,k)/phi(n/gcd(n,k)). (End)
a(n) ~ 2^n / n. - Vaclav Kotesovec, Aug 11 2021

Extensions

Revised by N. J. A. Sloane, Jun 10 2012

A008965 Number of necklaces of sets of beads containing a total of n beads.

Original entry on oeis.org

1, 2, 3, 5, 7, 13, 19, 35, 59, 107, 187, 351, 631, 1181, 2191, 4115, 7711, 14601, 27595, 52487, 99879, 190745, 364723, 699251, 1342183, 2581427, 4971067, 9587579, 18512791, 35792567, 69273667, 134219795, 260301175, 505294127, 981706831, 1908881899, 3714566311, 7233642929
Offset: 1

Views

Author

Keywords

Comments

A necklace of sets of beads is a cycle where each element of the cycle is itself a set of beads, the total size being the total number of beads.
Equivalently, a(n) is the number of cyclic compositions of n. These could also be loosely described as cyclic partitions.
Inverse Mobius transform of A059966. - Jianing Song, Nov 13 2021
This sequence seems to represent the number of modal families (i.e., sets of scales who are each other's modes) in a musical tuning with n notes per octave. - Luke Knotts, May 28 2025

Examples

			E.g. the 5 necklaces for n=4 are (3, 1), (4), (1, 1, 1, 1), (2, 1, 1), (2, 2).
In the Combstruct language these can be described as Cycle(Set(Z), Set(Z), Set(Z), Set(Z)), Cycle(Set(Z, Z), Set(Z), Set(Z)), Cycle(Set(Z, Z, Z, Z)), Cycle(Set(Z, Z), Set(Z, Z)), Cycle(Set(Z), Set(Z, Z, Z)).
For n=6 the 13 necklaces are
   1:  (1, 1, 1, 1, 1, 1),
   2:  (2, 1, 1, 1, 1),
   3:  (2, 1, 2, 1),
   4:  (2, 2, 1, 1),
   5:  (2, 2, 2),
   6:  (3, 1, 1, 1),
   7:  (3, 1, 2),
   8:  (3, 2, 1),
   9:  (3, 3),
  10:  (4, 1, 1),
  11:  (4, 2),
  12:  (5, 1),
  13:  (6).
[corrected by Marcel Vonk (mail(AT)marcelvonk.nl), Feb 05 2008]
		

References

  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 520, Table 8.13.

Crossrefs

Row sums of A037306. CIK transform of A057427.
Cf. A000031.

Programs

  • Maple
    with(combstruct): seq(combstruct[count]([ N,{N=Cycle(Set(Z,card>=1))},unlabeled ], size=n), n=1..100);
  • Mathematica
    a[n_] := Sum[ EulerPhi[d]*2^(n/d), {d, Divisors[n]}]/n-1; Table[a[n], {n, 1, 38}] (* Jean-François Alcover, Sep 04 2012, from A000031 *)
    nn=35; Drop[Apply[Plus,Table[CoefficientList[Series[CycleIndex[ CyclicGroup[n],s]/.Table[s[i]->x^i/(1-x^i),{i,1,n}],{x,0,nn}],x],{n,1,nn}]],1]  (* Geoffrey Critzer, Oct 30 2012 *)
  • PARI
    N=66;  x='x+O('x^N);
    B(x)=x/(1-x);
    A=sum(k=1,N,eulerphi(k)/k*log(1/(1-B(x^k))));
    Vec(A)
    /* Joerg Arndt, Aug 06 2012 */
    
  • Python
    from sympy import totient, divisors
    def A008965(n): return sum(totient(d)*(1<Chai Wah Wu, Sep 23 2023

Formula

a(n) = A000031(n) - 1.
G.f.: Sum_{k>=1} phi(k)/k * log( 1/(1-B(x^k)) ) where B(x)=x/(1-x); see the Flajolet/Soria reference. - Joerg Arndt, Aug 06 2012
From Jianing Song, Nov 13 2021: (Start)
a(n) = Sum_{d|(2^n-1)} phi(d)/ord(2,d), where phi = A000010 and ord(2,d) is the multiplicative order of 2 modulo d.
Dirichlet g.f.: zeta(s) * (f(s+1)/zeta(s+1) - 1), where f(s) = Sum_{n>=1} 2^n/n^s. (End)
Showing 1-10 of 160 results. Next