A000031
Number of n-bead necklaces with 2 colors when turning over is not allowed; also number of output sequences from a simple n-stage cycling shift register; also number of binary irreducible polynomials whose degree divides n.
Original entry on oeis.org
1, 2, 3, 4, 6, 8, 14, 20, 36, 60, 108, 188, 352, 632, 1182, 2192, 4116, 7712, 14602, 27596, 52488, 99880, 190746, 364724, 699252, 1342184, 2581428, 4971068, 9587580, 18512792, 35792568, 69273668, 134219796, 260301176, 505294128, 981706832
Offset: 0
For n=3 and n=4 the necklaces are {000,001,011,111} and {0000,0001,0011,0101,0111,1111}.
The analogous shift register sequences are {000..., 001001..., 011011..., 111...} and {000..., 00010001..., 00110011..., 0101..., 01110111..., 111...}.
- S. W. Golomb, Shift-Register Sequences, Holden-Day, San Francisco, 1967, pp. 120, 172.
- May, Robert M. "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
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Problem 7.112(a).
- Seiichi Manyama, Table of n, a(n) for n = 0..3333 (first 201 terms from T. D. Noe)
- Nicolás Álvarez, Verónica Becher, Martín Mereb, Ivo Pajor, and Carlos Miguel Soto, On extremal factors of de Bruijn-like graphs, arXiv:2308.16257 [math.CO], 2023. See references.
- Joerg Arndt, Matters Computational (The Fxtbook), p. 151, pp. 379-383.
- P. J. Cameron, Sequences realized by oligomorphic permutation groups, J. Integ. Seqs. Vol. 3 (2000), #00.1.5.
- J.-M. Champarnaud, G. Hansel, and D. Perrin, Unavoidable sets of constant length, Internat. J. Alg. Comput. 14 (2004), 241-251.
- Vladimir Dotsenko and Irvin Roy Hentzel, On the conjecture of Kashuba and Mathieu about free Jordan algebras, arXiv:2507.00437 [math.RA], 2025. See p. 14.
- James East and Ron Niles, Integer polygons of given perimeter, arXiv:1710.11245 [math.CO], 2017.
- S. N. Ethier and J. Lee, Parrondo games with spatial dependence, arXiv preprint arXiv:1202.2609 [math.PR], 2012.
- S. N. Ethier, Counting toroidal binary arrays, arXiv preprint arXiv:1301.2352 [math.CO], 2013 and J. Int. Seq. 16 (2013) #13.4.7.
- N. J. Fine, Classes of periodic sequences, Illinois J. Math., 2 (1958), 285-302.
- P. Flajolet and R. Sedgewick, Analytic Combinatorics, 2009; see pages 18, 64.
- H. Fredricksen, The lexicographically least de Bruijn cycle, J. Combin. Theory, 9 (1970) 1-5.
- Harold Fredricksen, An algorithm for generating necklaces of beads in two colors, Discrete Mathematics, Volume 61, Issues 2-3, September 1986, Pages 181-188.
- E. N. Gilbert and J. Riordan, Symmetry types of periodic sequences, Illinois J. Math., 5 (1961), 657-665.
- INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 2
- INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 130
- Juhani Karhumäki, S. Puzynina, M. Rao, and M. A. Whiteland, On cardinalities of k-abelian equivalence classes, arXiv preprint arXiv:1605.03319 [math.CO], 2016.
- Abraham Lempel, On extremal factors of the de Bruijn graph, J. Combinatorial Theory Ser. B 11 1971 17--27. MR0276126 (43 #1874).
- Karyn McLellan, Periodic coefficients and random Fibonacci sequences, Electronic Journal of Combinatorics, 20(4), 2013, #P32.
- Johannes Mykkeltveit, A proof of Golomb's conjecture for the de Bruijn graph, J. Combinatorial Theory Ser. B 13 (1972), 40-45. MR0323629 (48 #1985).
- Matthew Parker, The first 25K terms (7-Zip compressed file) [a large file]
- J. Riordan, Letter to N. J. A. Sloane, Jul. 1978
- Frank Ruskey, Necklaces, Lyndon words, De Bruijn sequences, etc.
- Frank Ruskey, Necklaces, Lyndon words, De Bruijn sequences, etc. [Cached copy, with permission, pdf format only]
- Ville Salo, Universal gates with wires in a row, arXiv:1809.08050 [math.GR], 2018.
- J. A. Siehler, The Finite Lamplighter Groups: A Guided Tour, College Mathematics Journal, Vol. 43, No. 3 (May 2012), pp. 203-211.
- N. J. A. Sloane, On single-deletion-correcting codes
- N. J. A. Sloane, On single-deletion-correcting codes, arXiv:math/0207197 [math.CO], 2002; in Codes and Designs (Columbus, OH, 2000), 273-291, Ohio State Univ. Math. Res. Inst. Publ., 10, de Gruyter, Berlin, 2002.
- David Thomson, Musical Polygons, Mathematics Today, Vol. 57, No. 2 (April 2021), pp. 50-51.
- R. C. Titsworth, Equivalence classes of periodic sequences, Illinois J. Math., 8 (1964), 266-270.
- A. M. Uludag, A. Zeytin and M. Durmus, Binary Quadratic Forms as Dessins, 2012.
- Eric Weisstein's World of Mathematics, Necklace
- Wolfram Research, Number of necklaces
- Index entries for "core" sequences
- Index entries for sequences related to necklaces
A008965(n) = a(n) - 1 allowing different offsets.
-
a000031 0 = 1
a000031 n = (`div` n) $ sum $
zipWith (*) (map a000010 divs) (map a000079 $ reverse divs)
where divs = a027750_row n
-- Reinhard Zumkeller, Mar 21 2013
-
with(numtheory); A000031 := proc(n) local d,s; if n = 0 then RETURN(1); else s := 0; for d in divisors(n) do s := s+phi(d)*2^(n/d); od; RETURN(s/n); fi; end; [ seq(A000031(n), n=0..50) ];
-
a[n_] := Sum[If[Mod[n, d] == 0, EulerPhi[d] 2^(n/d), 0], {d, 1, n}]/n
a[n_] := Fold[#1 + 2^(n/#2) EulerPhi[#2] &, 0, Divisors[n]]/n (* Ben Branman, Jan 08 2011 *)
Table[Expand[CycleIndex[CyclicGroup[n], t] /. Table[t[i]-> 2, {i, 1, n}]], {n,0, 30}] (* Geoffrey Critzer, Mar 06 2011*)
a[0] = 1; a[n_] := DivisorSum[n, EulerPhi[#]*2^(n/#)&]/n; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Feb 03 2016 *)
mx=40; CoefficientList[Series[1-Sum[EulerPhi[i] Log[1-2*x^i]/i,{i,1,mx}],{x,0,mx}],x] (*Herbert Kociemba, Oct 29 2016 *)
-
{A000031(n)=if(n==0,1,sumdiv(n,d,eulerphi(d)*2^(n/d))/n)} \\ Randall L Rathbun, Jan 11 2002
-
from sympy import totient, divisors
def A000031(n): return sum(totient(d)*(1<Chai Wah Wu, Nov 16 2022
There is an error in Fig. M3860 in the 1995 Encyclopedia of Integer Sequences: in the third line, the formula for
A000031 = M0564 should be (1/n) sum phi(d) 2^(n/d).
A059966
a(n) = (1/n) * Sum_{ d divides n } mu(n/d) * (2^d - 1).
Original entry on oeis.org
1, 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
Offset: 1
a(4)=3: the 3 elements [a,c], [a[a,b]] and d form a basis of all homogeneous elements of degree 4 in the free Lie algebra with generators a of degree 1, b of degree 2, c of degree 3 and d of degree 4.
From _Gus Wiseman_, Dec 19 2017: (Start)
The sequence of Lyndon compositions organized by sum begins:
(1),
(2),
(3),(12),
(4),(13),(112),
(5),(14),(23),(113),(122),(1112),
(6),(15),(24),(114),(132),(123),(1113),(1122),(11112),
(7),(16),(25),(115),(34),(142),(124),(1114),(133),(223),(1213),(1132),(1123),(11113),(1222),(11212),(11122),(111112). (End)
- C. Reutenauer, Free Lie algebras, Clarendon press, Oxford (1993).
- Reinhard Zumkeller, Table of n, a(n) for n = 1..1000
- Nicolas Andrews, Lucas Gagnon, Félix Gélinas, Eric Schlums, and Mike Zabrocki, When are Hopf algebras determined by integer sequences?, arXiv:2505.06941 [math.CO], 2025. See p. 17.
- S. V. Duzhin and D. V. Pasechnik, Groups acting on necklaces and sandpile groups, Journal of Mathematical Sciences, August 2014, Volume 200, Issue 6, pp 690-697. See page 85. - N. J. A. Sloane, Jun 30 2014
- Seok-Jin Kang and Myung-Hwan Kim, Free Lie Algebras, Generalized Witt Formula and the Denominator Identity, Journal of Algebra 183, 560-594 (1996).
- Michael J. Mossinghoff and Timothy S. Trudgian, A tale of two omegas, arXiv:1906.02847 [math.NT], 2019.
- G. Niklasch, Some number theoretical constants: 1000-digit values [Cached copy]
- Jakob Oesinghaus, Quasi-symmetric functions and the Chow ring of the stack of expanded pairs, arXiv:1806.10700 [math.AG], 2018.
- Robert Schneider, Andrew V. Sills, and Hunter Waldron, On the q-factorization of power series, arXiv:2501.18744 [math.CO], 2025. See p. 6.
Apart from initial terms, same as
A001037.
Cf.
A000225,
A000740,
A008683,
A008965,
A011782,
A060223,
A185700,
A228369,
A269134 A281013,
A296302,
A296373.
-
a059966 n = sum (map (\x -> a008683 (n `div` x) * a000225 x)
[d | d <- [1..n], mod n d == 0]) `div` n
-- Reinhard Zumkeller, Nov 18 2011
-
Table[1/n Apply[Plus, Map[(MoebiusMu[n/# ](2^# - 1)) &, Divisors[n]]], {n, 20}]
(* Second program: *)
Table[(1/n) DivisorSum[n, MoebiusMu[n/#] (2^# - 1) &], {n, 35}] (* Michael De Vlieger, Jul 22 2019 *)
-
from sympy import mobius, divisors
def A059966(n): return sum(mobius(n//d)*(2**d-1) for d in divisors(n,generator=True))//n # Chai Wah Wu, Feb 03 2022
Description corrected by Axel Kleinschmidt, Sep 15 2002
A006918
a(n) = binomial(n+3, 3)/4 for odd n, n*(n+2)*(n+4)/24 for even n.
Original entry on oeis.org
0, 1, 2, 5, 8, 14, 20, 30, 40, 55, 70, 91, 112, 140, 168, 204, 240, 285, 330, 385, 440, 506, 572, 650, 728, 819, 910, 1015, 1120, 1240, 1360, 1496, 1632, 1785, 1938, 2109, 2280, 2470, 2660, 2870, 3080, 3311, 3542, 3795, 4048, 4324, 4600, 4900, 5200, 5525, 5850, 6201, 6552, 6930
Offset: 0
G.f. = x + 2*x^2 + 5*x^3 + 8*x^4 + 14*x^5 + 20*x^6 + 30*x^7 + 40*x^8 + 55*x^9 + ...
From _Gus Wiseman_, Apr 06 2019: (Start)
The a(4 - 3) = 1 through a(8 - 3) = 14 integer partitions with Durfee square of length 2 are the following (see Franklin T. Adams-Watters's second comment). The Heinz numbers of these partitions are given by A325164.
(22) (32) (33) (43) (44)
(221) (42) (52) (53)
(222) (322) (62)
(321) (331) (332)
(2211) (421) (422)
(2221) (431)
(3211) (521)
(22111) (2222)
(3221)
(3311)
(4211)
(22211)
(32111)
(221111)
The a(0 + 1) = 1 through a(4 + 1) = 14 integer partitions of n into parts of two kinds with at most two parts of each kind are the following (see Franklin T. Adams-Watters's first comment).
()() ()(1) ()(2) ()(3) ()(4)
(1)() (2)() (3)() (4)()
()(11) (1)(2) (1)(3)
(1)(1) ()(21) ()(22)
(11)() (2)(1) (2)(2)
(21)() (22)()
(1)(11) ()(31)
(11)(1) (3)(1)
(31)()
(11)(2)
(1)(21)
(2)(11)
(21)(1)
(11)(11)
The a(6 - 5) = 1 through a(10 - 5) = 14 integer partitions whose third part is 2 are the following (see Emeric Deutsch's comment). The Heinz numbers of these partitions are given by A307373.
(222) (322) (332) (432) (442)
(2221) (422) (522) (532)
(2222) (3222) (622)
(3221) (3321) (3322)
(22211) (4221) (4222)
(22221) (4321)
(32211) (5221)
(222111) (22222)
(32221)
(33211)
(42211)
(222211)
(322111)
(2221111)
(End)
- J. M. Borwein, D. H. Bailey and R. Girgensohn, Experimentation in Mathematics, A K Peters, Ltd., Natick, MA, 2004. x+357 pp. See p. 147.
- M. Kac, An example of "counting without counting", Philips Res. Reports, 30 (1975), 20*-22* [Special issue in honour of C. J. Bouwkamp].
- E. V. McLaughlin, Numbers of factorizations in non-unique factorial domains, Senior Thesis, Allegeny College, Meadville, PA, 2004.
- K. B. Reid and L. W. Beineke "Tournaments", pp. 169-204 in L. W. Beineke and R. J. Wilson, editors, Selected Topics in Graph Theory, Academic Press, NY, 1978, p. 186, Theorem 6.11.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 1, 2nd ed., 2012, Exercise 4.16, pp. 530, 552.
- W. A. Whitworth, DCC Exercises in Choice and Chance, Stechert, NY, 1945, p. 33.
- T. D. Noe, Table of n, a(n) for n = 0..1000
- Jean-Luc Baril, Alexander Burstein, and Sergey Kirgizov, Pattern statistics in faro words and permutations, arXiv:2010.06270 [math.CO], 2020.
- David J. Broadhurst, On the enumeration of irreducible k-fold Euler sums and their roles in knot theory and field theory, arXiv:hep-th/9604128, 1996.
- David Broadhurst and Xavier Roulleau, Number of partitions of modular integers, arXiv:2502.19523 [math.NT], 2025. See p. 19.
- Yuriy Choliy and Andrew V. Sills, A formula for the partition function that “counts”, Preprint 2015.
- L. Colmenarejo, Combinatorics on several families of Kronecker coefficients related to plane partitions, arXiv:1604.00803 [math.CO], 2016. See Table 1 p. 5.
- S. J. Cyvin et al., Polygonal systems including the corannulene and coronene homologs: novel applications of Pólya's theorem, Z. Naturforsch., 52a (1997), 867-873.
- Steven Edwards and William Griffiths, Generalizations of Delannoy and cross polytope numbers, Fib. Q., Vol. 55, No. 4 (2017), pp. 356-366.
- B. G. Eke, Monotonic triads, Discrete Math., Vol. 9, No. 4 (1974), pp. 359-363. MR0354390 (50 #6869)
- Irene Erazo, John López, and Carlos Trujillo, A combinatorial problem that arose in integer B_3 Sets, Revista Colombiana de Matemáticas, Vol. 53, No. 2 (2019), pp. 195-203.
- Juan B. Gil and Jessica A. Tomasko, Pattern-avoiding even and odd Grassmannian permutations, arXiv:2207.12617 [math.CO], 2022.
- John Golden and Marcus Spradlin, Collinear and Soft Limits of Multi-Loop Integrands in N= 4 Yang-Mills, arXiv preprint arXiv:1203.1915 [hep-th], 2012. - From _N. J. A. Sloane_, Sep 14 2012
- Michele Graffeo, Sergej Monavari, Riccardo Moschetti, and Andrea T. Ricolfi, Enumeration of partitions via socle reduction, arXiv:2501.10267 [math.CO], 2025. See p. 40.
- Brian Hopkins and Aram Tangboonduangjit, Water Cells in Compositions of 1s and 2s, arXiv:2412.11528 [math.CO], 2024. See p. 3.
- Mohammed L. Nadji, Moussa Ahmia, Daniel F. Checa, and José L. Ramírez, Arndt Compositions with Restricted Parts, Palindromes, and Colored Variants, J. Int. Seq. (2025) Vol. 28, Issue 3, Article 25.3.6. See p. 11.
- Brian O'Sullivan and Thomas Busch, Spontaneous emission in ultra-cold spin-polarised anisotropic Fermi seas, arXiv 0810.0231v1 [quant-ph], 2008. [Eq 10b, lambda=2]
- Index entries for linear recurrences with constant coefficients, signature (2,1,-4,1,2,-1).
- Index entries for sequences related to Lyndon words.
-
a006918 n = a006918_list !! n
a006918_list = scanl (+) 0 a008805_list
-- Reinhard Zumkeller, Feb 01 2013
-
[Floor(Binomial(n+4, 4)/(n+4))-Floor((n+2)/8)*(1+(-1)^n)/2: n in [0..60]]; // Vincenzo Librandi, Nov 10 2014
-
with(combstruct):ZL:=[st,{st=Prod(left,right),left=Set(U,card=r),right=Set(U,card=r),U=Sequence(Z,card>=3)}, unlabeled]: subs(r=1,stack): seq(count(subs(r=2,ZL),size=m),m=11..58) ; # Zerinvary Lajos, Mar 09 2007
A006918 := proc(n)
if type(n,'even') then
n*(n+2)*(n+4)/24 ;
else
binomial(n+3,3)/4 ;
fi ;
end proc: # R. J. Mathar, May 17 2016
-
f[n_]:=If[EvenQ[n],(n(n+2)(n+4))/24,Binomial[n+3,3]/4]; Join[{0},Array[f,60]] (* Harvey P. Dale, Apr 20 2011 *)
durf[ptn_]:=Length[Select[Range[Length[ptn]],ptn[[#]]>=#&]];
Table[Length[Select[IntegerPartitions[n],durf[#]==2&]],{n,0,30}] (* Gus Wiseman, Apr 06 2019 *)
-
{ parttrees(n)=local(pt,k,nk); if (n%2==0, pt=(n/2+1)^2, pt=ceil(n/2)*(ceil(n/2)+1)); pt+=floor(n/2); for (x=1,floor(n/2),pt+=floor(x/2)+floor((n-x)/2)); if (n%2==0 && n>2, pt-=floor(n/4)); k=1; while (3*k<=n, for (x=k,floor((n-k)/2), pt+=floor(k/2); if (x!=k, pt+=floor(x/2)); if ((n-x-k)!=k && (n-x-k)!=x, pt+=floor((n-x-k)/2))); k++); pt }
-
{a(n) = n += 2; (n^3 - n * (2-n%2)^2) / 24}; /* Michael Somos, Aug 15 2009 */
A014580
Binary irreducible polynomials (primes in the ring GF(2)[X]), evaluated at X=2.
Original entry on oeis.org
2, 3, 7, 11, 13, 19, 25, 31, 37, 41, 47, 55, 59, 61, 67, 73, 87, 91, 97, 103, 109, 115, 117, 131, 137, 143, 145, 157, 167, 171, 185, 191, 193, 203, 211, 213, 229, 239, 241, 247, 253, 283, 285, 299, 301, 313, 319, 333, 351, 355, 357, 361, 369, 375
Offset: 1
David Petry (petry(AT)accessone.com)
x^4 + x^3 + 1 -> 16+8+1 = 25. Or, x^4 + x^3 + 1 -> 11001 (binary) = 25 (decimal).
Number of degree-n irreducible polynomials:
A001037, see also
A000031.
Table of irreducible factors of n:
A256170.
Sequences analyzing the difference between factorization into GF(2)[X] irreducibles and ordinary prime factorization of the corresponding integer:
A234741,
A234742,
A235032,
A235033,
A235034,
A235035,
A235040,
A236850,
A325386,
A325559,
A325560,
A325563,
A325641,
A325642,
A325643.
See
A115871 for sequences related to cross-domain congruences.
-
fQ[n_] := Block[{ply = Plus @@ (Reverse@ IntegerDigits[n, 2] x^Range[0, Floor@ Log2@ n])}, ply == Factor[ply, Modulus -> 2] && n != 2^Floor@ Log2@ n]; fQ[2] = True; Select[ Range@ 378, fQ] (* Robert G. Wilson v, Aug 12 2011 *)
Reap[Do[If[IrreduciblePolynomialQ[IntegerDigits[n, 2] . x^Reverse[Range[0, Floor[Log[2, n]]]], Modulus -> 2], Sow[n]], {n, 2, 1000}]][[2, 1]] (* Jean-François Alcover, Nov 21 2016 *)
-
is(n)=polisirreducible(Pol(binary(n))*Mod(1,2)) \\ Charles R Greathouse IV, Mar 22 2013
A027375
Number of aperiodic binary strings of length n; also number of binary sequences with primitive period n.
Original entry on oeis.org
0, 2, 2, 6, 12, 30, 54, 126, 240, 504, 990, 2046, 4020, 8190, 16254, 32730, 65280, 131070, 261576, 524286, 1047540, 2097018, 4192254, 8388606, 16772880, 33554400, 67100670, 134217216, 268419060, 536870910, 1073708010, 2147483646, 4294901760
Offset: 0
a(3) = 6 = |{ 001, 010, 011, 100, 101, 110 }|. - corrected by _Geoffrey Critzer_, Dec 07 2014
- J.-P. Allouche and J. Shallit, Automatic Sequences, Cambridge Univ. Press, 2003, p. 13. - From N. J. A. Sloane, Oct 26 2012
- E. R. Berlekamp, Algebraic Coding Theory, McGraw-Hill, NY, 1968, p. 84.
- Blanchet-Sadri, Francine. Algorithmic combinatorics on partial words. Chapman & Hall/CRC, Boca Raton, FL, 2008. ii+385 pp. ISBN: 978-1-4200-6092-8; 1-4200-6092-9 MR2384993 (2009f:68142). See p. 164.
- S. W. Golomb, Shift-Register Sequences, Holden-Day, San Francisco, 1967.
- Mark I. Krusemeyer, George T. Gilbert, Loren C. Larson, A Mathematical Orchard, Problems and Solutions, MAA, 2012, Problem 128, pp. 225-227.
- T. D. Noe, Table of n, a(n) for n = 0..300
- J.-P. Allouche, Note on the transcendence of a generating function. In A. Laurincikas and E. Manstavicius, editors, Proceedings of the Palanga Conference for the 75th birthday of Prof. Kubilius, New trends in Probab. and Statist., Vol. 4, pages 461-465, 1997.
- B. Chaffin, J. P. Linderman, N. J. A. Sloane and Allan Wilks, On Curling Numbers of Integer Sequences, arXiv:1212.6102 [math.CO], Dec 25 2012.
- B. Chaffin, J. P. Linderman, N. J. A. Sloane and Allan Wilks, On Curling Numbers of Integer Sequences, Journal of Integer Sequences, Vol. 16 (2013), Article 13.4.3.
- John D. Cook, Counting primitive bit strings (2014).
- P. Flajolet and R. Sedgewick, Analytic Combinatorics, 2009; see page 85.
- Guilhem Gamard, Gwenaël Richomme, Jeffrey Shallit and Taylor J. Smith, Periodicity in rectangular arrays, arXiv:1602.06915 [cs.DM], 2016; Information Processing Letters 118 (2017) 58-63. See Table 1.
- O. Georgiou, C. P. Dettmann and E. G. Altmann, Faster than expected escape for a class of fully chaotic maps, arXiv preprint arXiv:1207.7000 [nlin.CD], 2012. - From _N. J. A. Sloane_, Dec 23 2012
- E. N. Gilbert and J. Riordan, Symmetry types of periodic sequences, Illinois J. Math., 5 (1961), 657-665.
- David W. Lyons, Cristina Mullican, Adam Rilatt, and Jack D. Putnam, Werner states from diagrams, arXiv:2302.05572 [quant-ph], 2023.
- 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
- M. B. Nathanson, Primitive sets and Euler phi function for subsets of {1,2,...,n}, arXiv:math/0608150 [math.NT], 2006-2007.
- P. Pongsriiam, Relatively Prime Sets, Divisor Sums, and Partial Sums, arXiv:1306.4891 [math.NT], 2013 and J. Int. Seq. 16 (2013) #13.9.1.
- P. Pongsriiam, A remark on relative prime sets, arXiv:1306.2529 [math.NT], 2013.
- P. Pongsriiam, A remark on relative prime sets, Integers 13 (2013), A49.
- R. C. Read, Combinatorial problems in the theory of music, Disc. Math. 167/168 (1997) 543-551, sequence A(n).
- M. Tang, Relatively Prime Sets and a Phi Function for Subsets of {1, 2, ... , n}, J. Int. Seq. 13 (2010) # 10.7.6.
- László Tóth, Menon-type identities concerning subsets of the set {1,2,...,n}, arXiv:2109.06541 [math.NT], 2021.
A038199 and
A056267 are essentially the same sequence with different initial terms.
-
a027375 n = n * a001037 n -- Reinhard Zumkeller, Feb 01 2013
-
with(numtheory): A027375 :=n->add( mobius(d)*2^(n/d), d = divisors(n)); # N. J. A. Sloane, Sep 25 2012
-
Table[ Apply[ Plus, MoebiusMu[ n / Divisors[n] ]*2^Divisors[n] ], {n, 1, 32} ]
a[0]=0; a[n_] := DivisorSum[n, MoebiusMu[n/#]*2^#&]; Array[a, 40, 0] (* Jean-François Alcover, Dec 01 2015 *)
-
a(n) = sumdiv(n,d,moebius(n\d)*2^d);
-
from sympy import mobius, divisors
def a(n): return sum(mobius(d)*2**(n//d) for d in divisors(n))
print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 28 2017
A000048
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.
Original entry on oeis.org
1, 1, 1, 1, 2, 3, 5, 9, 16, 28, 51, 93, 170, 315, 585, 1091, 2048, 3855, 7280, 13797, 26214, 49929, 95325, 182361, 349520, 671088, 1290555, 2485504, 4793490, 9256395, 17895679, 34636833, 67108864, 130150493, 252645135, 490853403, 954437120, 1857283155
Offset: 0
a(5) = 3 corresponding to the necklaces 00001, 00111, 01011.
a(6) = 5 from 000001, 000011, 000101, 000111, 001011.
- B. D. Ginsburg, On a number theory function applicable in coding theory, Problemy Kibernetiki, No. 19 (1967), pp. 249-252.
- H. Kawakami, Table of rotation sequences of x_{n+1} = x_n^2 - lambda, pp. 73-92 of G. Ikegami, Editor, Dynamical Systems and Nonlinear Oscillations, Vol. 1, World Scientific, 1986.
- 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
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- G. C. Greubel, Table of n, a(n) for n = 0..3320 (terms 0..200 from T. D. Noe)
- Joerg Arndt, Matters Computational (The Fxtbook), p.408 and p.848.
- L. Carlitz, A theorem of Dickson on irreducible polynomials, Proc. Amer. Math. Soc. 3, (1952). 693-700.
- CombOS - Combinatorial Object Server, Generate necklaces, Lyndon words, chord diagrams, and relatives
- J. Demongeot, M. Noual and S. Sene, On the number of attractors of positive and negative threshold Boolean automata circuits, hal-00647877 preprint (2009). [From Mathilde Noual (mathilde.noual(AT)ens-lyon.fr), Mar 03 2009]
- N. J. Fine, Classes of periodic sequences, Illinois J. Math., 2 (1958), 285-302.
- H. L. Fisher, Letter to N. J. A. Sloane, Mar 16 1989
- E. N. Gilbert and J. Riordan, Symmetry types of periodic sequences, Illinois J. Math., 5 (1961), 657-665.
- R. W. Hall and P. Klingsberg, Asymmetric rhythms and tiling canons, Amer. Math. Monthly, 113 (2006), 887-896.
- J. E. Iglesias, A formula for the number of closest packings of equal spheres having a given repeat period, Z. Krist. 155 (1981) 121-127, Table 2.
- J. E. Iglesias, Enumeration of polytypes MX and MX_2 through the use of the symmetry of the Zhadanov symbol, Acta Cryst. A 62 (3) (2006) 178-194, Table 1.
- Veronika Irvine, Lace Tessellations: A mathematical model for bobbin lace and an exhaustive combinatorial search for patterns, PhD Dissertation, University of Victoria, 2016.
- A. A. Kulkarni, N. Kiyavash and R. Sreenivas, On the Varshamov-Tenengolts Construction on Binary Strings, 2013.
- R. P. Loh, A. G. Shannon, A. F. Horadam, Divisibility Criteria and Sequence Generators Associated with Fermat Coefficients, Preprint, 1980.
- R. M. May, Simple mathematical models with very complicated dynamics, Nature, 261 (Jun 10, 1976), 459-467.
- N. Metropolis, M. L. Stein and P. R. Stein, On finite limit sets for transformations on the unit interval, J. Combin. Theory, A 15 (1973), 25-44; reprinted in P. Cvitanovic, ed., Universality in Chaos, Hilger, Bristol, 1986, pp. 187-206.
- H. Meyn and W. Götz, Self-reciprocal polynomials over finite fields, Séminaire Lotharingien de Combinatoire, B21d (1989), 8 pp.
- Simon Michalowsky, Bahman Gharesifard, Christian Ebenbauer, A Lie bracket approximation approach to distributed optimization over directed graphs, arXiv:1711.05486 [math.OC], 2017.
- Tilman Piesk, Lists of the three sets of necklaces for n=1..12
- R. Pries and C. Weir, The Ekedahl-Oort type of Jacobians of Hermitian curves, arXiv preprint arXiv:1302.6261 [math.NT], 2013.
- Frank Ruskey, Number of q-ary Lyndon words with given trace mod q
- Frank Ruskey, Number of Lyndon words over GF(q) with given trace
- N. J. A. Sloane, On single-deletion-correcting codes, arXiv:math/0207197 [math.CO], 2002; in Codes and Designs (Columbus, OH, 2000), 273-291, Ohio State Univ. Math. Res. Inst. Publ., 10, de Gruyter, Berlin, 2002.
- N. J. A. Sloane, On single-deletion-correcting codes
- B. R. Smith, Reducing quadratic forms by kneading sequences, Journal of Integer Sequences, 17 (2014), article 14.11.8.
- P. R. Stein, Letter to N. J. A. Sloane, Jun 02 1971
- J.-Y. Thibon, The cycle enumerator of unimodal permutations, arXiv:math/0102051 [math.CO], 2001.
- Index entries for "core" sequences
- Index entries for sequences related to Lyndon words
- Index entries for sequences related to subset sums modulo m
Very close to
A006788 [Fisher, 1989].
-
with(numtheory); A000048 := proc(n) local d,t1; if n = 0 then RETURN(1) else t1 := 0; for d from 1 to n do if n mod d = 0 and d mod 2 = 1 then t1 := t1+mobius(d)*2^(n/d)/(2*n); fi; od; RETURN(t1); fi; end;
-
a[n_] := Total[ MoebiusMu[#]*2^(n/#)& /@ Select[ Divisors[n], OddQ]]/(2n); a[0] = 1; Table[a[n], {n,0,35}] (* Jean-François Alcover, Jul 21 2011 *)
a[ n_] := If[ n < 1, Boole[n == 0], DivisorSum[ n, MoebiusMu[#] 2^(n/#) &, OddQ] / (2 n)]; (* Michael Somos, Dec 20 2014 *)
-
A000048(n) = sumdiv(n,d,(d%2)*(moebius(d)*2^(n/d)))/(2*n) \\ Michael B. Porter, Nov 09 2009
-
L(n, k) = sumdiv(gcd(n,k), d, moebius(d) * binomial(n/d, k/d) );
a(n) = sum(k=0, n, if( (n+k)%2==1, L(n, k), 0 ) ) / n;
vector(55,n,a(n)) \\ Joerg Arndt, Jun 28 2012
-
from sympy import divisors, mobius
def a(n): return 1 if n<1 else sum(mobius(d)*2**(n//d) for d in divisors(n) if d%2)//(2*n) # Indranil Ghosh, Apr 28 2017
A001840
Expansion of g.f. x/((1 - x)^2*(1 - x^3)).
Original entry on oeis.org
0, 1, 2, 3, 5, 7, 9, 12, 15, 18, 22, 26, 30, 35, 40, 45, 51, 57, 63, 70, 77, 84, 92, 100, 108, 117, 126, 135, 145, 155, 165, 176, 187, 198, 210, 222, 234, 247, 260, 273, 287, 301, 315, 330, 345, 360, 376, 392, 408, 425, 442, 459, 477, 495, 513, 532, 551, 570, 590
Offset: 0
G.f. = x + 2*x^2 + 3*x^3 + 5*x^4 + 7*x^5 + 9*x^6 + 12*x^7 + 15*x^8 + 18*x^9 + ...
1+2+3=6=t(3), 2+3+5=t(4), 5+7+9=t(5).
[n] a(n)
--------
[1] 1
[2] 2
[3] 3
[4] 1 + 4
[5] 2 + 5
[6] 3 + 6
[7] 1 + 4 + 7
[8] 2 + 5 + 8
[9] 3 + 6 + 9
a(7) = floor(2/3) +floor(3/3) +floor(4/3) +floor(5/3) +floor(6/3) +floor(7/3) +floor(8/3) +floor(9/3) = 12. - _Bruno Berselli_, Aug 29 2013
- Tom M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 73, problem 25.
- Ulrich Faigle, Review of Gerhard Post and G.J. Woeginger, Sports tournaments, home-away assignments and the break minimization problem, MR2224983(2007b:90134), 2007.
- Hansraj Gupta, Partitions of j-partite numbers into twelve or a smaller number of parts. Collection of articles dedicated to Professor P. L. Bhatnagar on his sixtieth birthday. Math. Student 40 (1972), 401-441 (1974).
- Richard K. Guy, A problem of Zarankiewicz, in P. Erdős and G. Katona, editors, Theory of Graphs (Proceedings of the Colloquium, Tihany, Hungary), Academic Press, NY, 1968, pp. 119-150, (p. 126, divided by 2).
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- T. D. Noe, Table of n, a(n) for n = 0..1000
- Chwas Ahmed, Paul Martin, and Volodymyr Mazorchuk, On the number of principal ideals in d-tonal partition monoids, arXiv preprint arXiv:1503.06718 [math.CO], 2015.
- Gert Almkvist, Asymptotic formulas and generalized Dedekind sums, Exper. Math., 7 (No. 4, 1998), pp. 343-359.
- David J. Broadhurst, On the enumeration of irreducible k-fold Euler sums and their roles in knot theory and field theory, arXiv:hep-th/9604128, 1996.
- David Broadhurst and Xavier Roulleau, Number of partitions of modular integers, arXiv:2502.19523 [math.NT], 2025. See p. 19.
- Cristian Cobeli, Aaditya Raghavan, and Alexandru Zaharescu, On the central ball in a translation invariant involutive field, arXiv:2408.01864 [math.NT], 2024. See p. 7.
- Neville de Mestre and John Baker, Pebbles, Ducks and Other Surprises, Australian Maths. Teacher, Vol. 48, No 3, 1992, pp. 4-7.
- Peter M. Chema, Illustration of first 27 terms as corners of a double hexagon spiral from 0
- H. Gupta, Partitions of j-partite numbers into twelve or a smaller number of parts, Math. Student 40 (1972), 401-441 (1974). [Annotated scanned copy]
- Richard K. Guy, A problem of Zarankiewicz, Research Paper No. 12, Dept. of Math., Univ. Calgary, Jan. 1967. [Annotated and scanned copy, with permission]
- INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 207.
- Clark Kimberling, A Combinatorial Classification of Triangle Centers on the Line at Infinity, J. Int. Seq., Vol. 22 (2019), Article 19.5.4.
- Clark Kimberling and John E. Brown, Partial Complements and Transposable Dispersions, J. Integer Seqs., Vol. 7, 2004.
- R. P. Loh, A. G. Shannon, and A. F. Horadam, Divisibility Criteria and Sequence Generators Associated with Fermat Coefficients, Preprint, 1980.
- Pieter Moree, The formal series Witt transform, Discr. Math. no. 295 vol. 1-3 (2005) 143-160.
- Brian O'Sullivan and Thomas Busch, Spontaneous emission in ultra-cold spin-polarised anisotropic Fermi seas, arXiv 0810.0231v1 [quant-ph], 2008. [Eq 8a, lambda=3]
- Simon Plouffe, Approximations de séries génératrices et quelques conjectures, Dissertation, Université du Québec à Montréal, 1992; arXiv:0911.4975 [math.NT], 2009.
- Simon Plouffe, 1031 Generating Functions, Appendix to Thesis, Montreal, 1992.
- Gerhard Post and G. J. Woeginger, Sports tournaments, home-away assignments and the break minimization problem, Discrete Optimization 3, pp. 165-173, 2006.
- Michael Somos, Somos Polynomials.
- Gary E. Stevens, A Connell-Like Sequence, J. Integer Seqs., 1 (1998), Article 98.1.4.
- Andrei K. Svinin, On some class of sums, arXiv:1610.05387 [math.CO], 2016. See p. 7.
- Eric Weisstein's World of Mathematics, Lower Matching Number.
- Eric Weisstein's World of Mathematics, Triangular Grid Graph.
- Eric Weisstein's World of Mathematics, Triangular Honeycomb King Graph.
- Index entries for sequences related to Lyndon words.
- Index entries for two-way infinite sequences.
- Index entries for linear recurrences with constant coefficients, signature (2,-1,1,-2,1).
Ordered union of triangular matchstick numbers
A045943 and generalized pentagonal numbers
A001318.
A337483 counts either weakly increasing or weakly decreasing triples.
A337484 counts neither strictly increasing nor strictly decreasing triples.
-
a001840 n = a001840_list !! n
a001840_list = scanl (+) 0 a008620_list
-- Reinhard Zumkeller, Apr 16 2012
-
[ n le 2 select n else n*(n+1)/2-Self(n-1)-Self(n-2): n in [1..58] ]; // Klaus Brockhaus, Oct 01 2009
-
A001840 := n->floor((n+1)*(n+2)/6);
A001840:=-1/((z**2+z+1)*(z-1)**3); # conjectured (correctly) by Simon Plouffe in his 1992 dissertation
seq(floor(binomial(n-1,2)/3), n=3..61); # Zerinvary Lajos, Jan 12 2009
A001840 := n -> add(k, k = select(k -> k mod 3 = n mod 3, [$1 .. n])): seq(A001840(n), n = 0 .. 58); # Peter Luschny, Jul 06 2011
-
a[0]=0; a[1]=1; a[n_]:= a[n]= n(n+1)/2 -a[n-1] -a[n-2]; Table[a[n], {n,0,100}]
f[n_] := Floor[(n + 1)(n + 2)/6]; Array[f, 59, 0] (* Or *)
CoefficientList[ Series[ x/((1 + x + x^2)*(1 - x)^3), {x, 0, 58}], x] (* Robert G. Wilson v *)
a[ n_] := With[{m = If[ n < 0, -3 - n, n]}, SeriesCoefficient[ x /((1 - x^3) (1 - x)^2), {x, 0, m}]]; (* Michael Somos, Jul 11 2011 *)
LinearRecurrence[{2,-1,1,-2,1},{0,1,2,3,5},60] (* Harvey P. Dale, Jul 25 2011 *)
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n+4,{3}],#[[1]]<#[[2]]&[[1]]<#[[3]]&]],{n,0,15}] (* Gus Wiseman, Oct 05 2020 *)
-
{a(n) = (n+1) * (n+2) \ 6}; /* Michael Somos, Feb 11 2004 */
-
[binomial(n, 2) // 3 for n in range(2, 61)] # Zerinvary Lajos, Dec 01 2009
A001692
Number of irreducible polynomials of degree n over GF(5); dimensions of free Lie algebras.
Original entry on oeis.org
1, 5, 10, 40, 150, 624, 2580, 11160, 48750, 217000, 976248, 4438920, 20343700, 93900240, 435959820, 2034504992, 9536718750, 44878791360, 211927516500, 1003867701480, 4768371093720, 22706531339280
Offset: 0
- E. R. Berlekamp, Algebraic Coding Theory, McGraw-Hill, NY, 1968, p. 84.
- Steven R. Finch, Mathematical Constants, Cambridge University Press, 2003
- M. Lothaire, Combinatorics on Words. Addison-Wesley, Reading, MA, 1983, p. 79.
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- Seiichi Manyama, Table of n, a(n) for n = 0..1435 (terms 0..200 from T. D. Noe)
- Alin Bostan, Alexander Marynych, and Kilian Raschel, On the least common multiple of several random~integers, arXiv:1901.03002 [math.PR], 2019.
- Jeremie Detrey, P. J. Spaenlehauer, and P. Zimmermann, Computing the rho constant, Preprint 2016.
- E. N. Gilbert and J. Riordan, Symmetry types of periodic sequences, Illinois J. Math., 5 (1961), 657-665.
- Gareth A. Jones and Alexander K. Zvonkin, Groups of prime degree and the Bateman-Horn conjecture, 2021.
- G. Niklasch, Some number theoretical constants: 1000-digit values [Cached copy]
- Y. Puri and T. Ward, Arithmetic and growth of periodic orbits, J. Integer Seqs., Vol. 4 (2001), #01.2.1.
- Dionisel Y. Regalado and Rodel Azura, An Analytic Approximation to the Density of Twin Primes, Recoletos Multidisciplinary Research Journal (2019) Vol. 6, No. 2.
- G. J. Simmons, The number of irreducible polynomials of degree n over GF(p), Amer. Math. Monthly, 77 (1970), 743-745.
- G. Viennot, Algèbres de Lie Libres et Monoïdes Libres, Lecture Notes in Mathematics 691, Springer Verlag 1978.
- Index entries for sequences related to Lyndon words
-
a001692 n = flip div n $ sum $
zipWith (*) (map a008683 divs) (map a000351 $ reverse divs)
where divs = a027750_row n
-- Reinhard Zumkeller, Oct 07 2015
-
a[0] = 1; a[n_] := Sum[MoebiusMu[d]*5^(n/d)/n, {d, Divisors[n]}]; Table[a[n], {n, 0, 21}] (* Jean-François Alcover, Mar 11 2014 *)
mx=40;f[x_,k_]:=1-Sum[MoebiusMu[i] Log[1-k*x^i]/i,{i,1,mx}];CoefficientList[Series[f[x,5],{x,0,mx}],x] (* Herbert Kociemba, Nov 25 2016 *)
-
a(n)=if(n,sumdiv(n,d,moebius(d)*5^(n/d))/n,1) \\ Charles R Greathouse IV, Jun 15 2011
A328596
Numbers whose reversed binary expansion is a Lyndon word (aperiodic necklace).
Original entry on oeis.org
1, 2, 4, 6, 8, 12, 14, 16, 20, 24, 26, 28, 30, 32, 40, 44, 48, 52, 56, 58, 60, 62, 64, 72, 80, 84, 88, 92, 96, 100, 104, 106, 108, 112, 116, 118, 120, 122, 124, 126, 128, 144, 152, 160, 164, 168, 172, 176, 180, 184, 188, 192, 200, 208, 212, 216, 218, 220, 224
Offset: 1
The sequence of terms together with their binary expansions and binary indices begins:
1: 1 ~ {1}
2: 10 ~ {2}
4: 100 ~ {3}
6: 110 ~ {2,3}
8: 1000 ~ {4}
12: 1100 ~ {3,4}
14: 1110 ~ {2,3,4}
16: 10000 ~ {5}
20: 10100 ~ {3,5}
24: 11000 ~ {4,5}
26: 11010 ~ {2,4,5}
28: 11100 ~ {3,4,5}
30: 11110 ~ {2,3,4,5}
32: 100000 ~ {6}
40: 101000 ~ {4,6}
44: 101100 ~ {3,4,6}
48: 110000 ~ {5,6}
52: 110100 ~ {3,5,6}
56: 111000 ~ {4,5,6}
58: 111010 ~ {2,4,5,6}
-
aperQ[q_]:=Array[RotateRight[q,#]&,Length[q],1,UnsameQ];
neckQ[q_]:=Array[OrderedQ[{q,RotateRight[q,#]}]&,Length[q]-1,1,And];
Select[Range[100],aperQ[Reverse[IntegerDigits[#,2]]]&&neckQ[Reverse[IntegerDigits[#,2]]]&]
A275692
Numbers k such that every rotation of the binary digits of k is less than k.
Original entry on oeis.org
0, 1, 2, 4, 6, 8, 12, 14, 16, 20, 24, 26, 28, 30, 32, 40, 48, 50, 52, 56, 58, 60, 62, 64, 72, 80, 84, 96, 98, 100, 104, 106, 108, 112, 114, 116, 118, 120, 122, 124, 126, 128, 144, 160, 164, 168, 192, 194, 196, 200, 202, 208, 210, 212, 216, 218, 224, 226, 228
Offset: 1
6 is in the sequence because its binary representation 110 is greater than all the rotations 011 and 101.
10 is not in the sequence because its binary representation 1010 is unchanged under rotation by 2 places.
From _Gus Wiseman_, Oct 31 2019: (Start)
The sequence of terms together with their binary expansions and binary indices begins:
1: 1 ~ {1}
2: 10 ~ {2}
4: 100 ~ {3}
6: 110 ~ {2,3}
8: 1000 ~ {4}
12: 1100 ~ {3,4}
14: 1110 ~ {2,3,4}
16: 10000 ~ {5}
20: 10100 ~ {3,5}
24: 11000 ~ {4,5}
26: 11010 ~ {2,4,5}
28: 11100 ~ {3,4,5}
30: 11110 ~ {2,3,4,5}
32: 100000 ~ {6}
40: 101000 ~ {4,6}
48: 110000 ~ {5,6}
50: 110010 ~ {2,5,6}
52: 110100 ~ {3,5,6}
56: 111000 ~ {4,5,6}
58: 111010 ~ {2,4,5,6}
(End)
Numbers whose binary expansion is aperiodic are
A328594.
Numbers whose reversed binary expansion is a necklace are
A328595.
Length of Lyndon factorization of binary expansion is
A211100.
Length of co-Lyndon factorization of binary expansion is
A329312.
Length of Lyndon factorization of reversed binary expansion is
A329313.
Length of co-Lyndon factorization of reversed binary expansion is
A329326.
All of the following pertain to compositions in standard order (
A066099):
- Rotational symmetries are counted by
A138904.
- Constant compositions are
A272919.
- Lyndon compositions are
A275692 (this sequence).
- Co-Lyndon compositions are
A326774.
- Co-Lyndon factorizations are counted by
A333765.
- Lyndon factorizations are counted by
A333940.
-
filter:= proc(n) local L, k;
L:= convert(convert(n,binary),string);
for k from 1 to length(L)-1 do
if lexorder(L,StringTools:-Rotate(L,k)) then return false fi;
od;
true
end proc:
select(filter, [$0..1000]);
-
filterQ[n_] := Module[{bits, rr}, bits = IntegerDigits[n, 2]; rr = NestList[RotateRight, bits, Length[bits]-1] // Rest; AllTrue[rr, FromDigits[#, 2] < n&]];
Select[Range[0, 1000], filterQ] (* Jean-François Alcover, Apr 29 2019 *)
-
def ok(n):
b = bin(n)[2:]
return all(b[i:] + b[:i] < b for i in range(1, len(b)))
print([k for k in range(230) if ok(k)]) # Michael S. Branicky, May 26 2022
Comments