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
A143325
Table T(n,k) by antidiagonals. T(n,k) is the number of length n primitive (=aperiodic or period n) k-ary words (n,k >= 1) which are earlier in lexicographic order than any other word derived by cyclic shifts of the alphabet.
Original entry on oeis.org
1, 1, 0, 1, 1, 0, 1, 2, 3, 0, 1, 3, 8, 6, 0, 1, 4, 15, 24, 15, 0, 1, 5, 24, 60, 80, 27, 0, 1, 6, 35, 120, 255, 232, 63, 0, 1, 7, 48, 210, 624, 1005, 728, 120, 0, 1, 8, 63, 336, 1295, 3096, 4095, 2160, 252, 0, 1, 9, 80, 504, 2400, 7735, 15624, 16320, 6552, 495, 0, 1, 10, 99
Offset: 1
T(4,2)=6, because 6 words of length 4 over 2-letter alphabet {a,b} are primitive and earlier than others derived by cyclic shifts of the alphabet: aaab, aaba, aabb, abaa, abba, abbb; note that aaaa and abab are not primitive and words beginning with b can be derived by shifts of the alphabet from words in the list; secondly note that the words in the list need not be Lyndon words, for example aaba can be derived from aaab by a cyclic rotation of the positions.
Table begins:
1, 1, 1, 1, 1, 1, 1, 1, ...
0, 1, 2, 3, 4, 5, 6, 7, ...
0, 3, 8, 15, 24, 35, 48, 63, ...
0, 6, 24, 60, 120, 210, 336, 504, ...
0, 15, 80, 255, 624, 1295, 2400, 4095, ...
0, 27, 232, 1005, 3096, 7735, 16752, 32697, ...
0, 63, 728, 4095, 15624, 46655, 117648, 262143, ...
0, 120, 2160, 16320, 78000, 279720, 823200, 2096640, ...
-
with(numtheory):
f1:= proc(n) option remember;
unapply(k^(n-1)-add(f1(d)(k), d=divisors(n)minus{n}), k)
end;
T:= (n,k)-> f1(n)(k);
seq(seq(T(n, 1+d-n), n=1..d), d=1..12);
-
t[n_, k_] := Sum[k^(d-1)*MoebiusMu[n/d], {d, Divisors[n]}]; Table[t[n-k+1, k], {n, 1, 12}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Jan 21 2014, from first formula *)
A152061
Counts of unique periodic binary strings of length n.
Original entry on oeis.org
0, 0, 2, 2, 4, 2, 10, 2, 16, 8, 34, 2, 76, 2, 130, 38, 256, 2, 568, 2, 1036, 134, 2050, 2, 4336, 32, 8194, 512, 16396, 2, 33814, 2, 65536, 2054, 131074, 158, 266176, 2, 524290, 8198, 1048816, 2, 2113462, 2, 4194316, 33272, 8388610, 2, 16842496, 128, 33555424
Offset: 0
a(3) = 2 = |{ 000, 111 }|, a(4) = 4 = |{ 0000, 1111, 0101, 1010 }|.
-
with(numtheory):
a:= n-> `if`(n=0, 0, 2^n -add(mobius(n/d)*2^d, d=divisors(n))):
seq(a(n), n=0..100); # Alois P. Heinz, Sep 26 2011
-
a[0] = 0; a[n_] := 2^n - Sum[MoebiusMu[n/d]*2^d, {d, Divisors[n]}];
Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Jul 04 2019 *)
-
from sympy import mobius, divisors
def A152061(n): return -sum(mobius(n//d)<Chai Wah Wu, Sep 21 2024
A143326
Table T(n,k) by antidiagonals. T(n,k) is the number of primitive (=aperiodic) k-ary words with length less than or equal to n (n,k >= 1).
Original entry on oeis.org
1, 2, 1, 3, 4, 1, 4, 9, 10, 1, 5, 16, 33, 22, 1, 6, 25, 76, 105, 52, 1, 7, 36, 145, 316, 345, 106, 1, 8, 49, 246, 745, 1336, 1041, 232, 1, 9, 64, 385, 1506, 3865, 5356, 3225, 472, 1, 10, 81, 568, 2737, 9276, 19345, 21736, 9705, 976, 1, 11, 100, 801, 4600, 19537, 55686
Offset: 1
T(2,3) = 9, because there are 9 primitive words of length less than or equal to 2 over 3-letter alphabet {a,b,c}: a, b, c, ab, ac, ba, bc, ca, cb; note that the non-primitive words aa, bb and cc don't belong to the list; secondly note that the words in the list need not be Lyndon words, for example ba can be derived from ab by a cyclic rotation of the positions.
Table begins:
1, 2, 3, 4, 5, 6, 7, 8, ...
1, 4, 9, 16, 25, 36, 49, 64, ...
1, 10, 33, 76, 145, 246, 385, 568, ...
1, 22, 105, 316, 745, 1506, 2737, 4600, ...
1, 52, 345, 1336, 3865, 9276, 19537, 37360, ...
1, 106, 1041, 5356, 19345, 55686, 136801, 298936, ...
1, 232, 3225, 21736, 97465, 335616, 960337, 2396080, ...
1, 472, 9705, 87016, 487465, 2013936, 6722737, 19169200, ...
...
From _Wolfdieter Lang_, Feb 01 2014: (Start)
The triangle Tri(n,m) := T(m,n-(m-1)) begins:
n\m 1 2 3 4 5 6 7 8 9 10 ...
1: 1
2: 2 1
3: 3 4 1
4: 4 9 10 1
5: 5 16 33 22 1
6: 6 25 76 105 52 1
7: 7 36 145 316 345 106 1
8: 8 49 246 745 1336 1041 232 1
9: 9 64 385 1506 3865 5356 3225 472 1
10: 10 81 568 2737 9276 19345 21736 9705 976 1
...
For the columns see A000027, A000290, A081437, ... (End)
-
with(numtheory):
f0:= proc(n) option remember;
unapply(k^n-add(f0(d)(k), d=divisors(n) minus {n}), k)
end:
g0:= proc(n) option remember; unapply(add(f0(j)(x), j=1..n), x) end:
T:= (n, k)-> g0(n)(k):
seq(seq(T(n, 1+d-n), n=1..d), d=1..12);
-
f0[n_] := f0[n] = Function[k, k^n-Sum[f0[d][k], {d, Divisors[n] // Most}]]; g0[n_] := g0[n] = Function[x, Sum[f0[j][x], {j, 1, n}]]; T[n_, k_] := g0[n][k]; Table[T[n, 1+d-n], {d, 1, 12}, {n, 1, d}]//Flatten (* Jean-François Alcover, Feb 12 2014, translated from Maple *)
A054718
Number of ternary sequences with primitive period n.
Original entry on oeis.org
1, 3, 6, 24, 72, 240, 696, 2184, 6480, 19656, 58800, 177144, 530640, 1594320, 4780776, 14348640, 43040160, 129140160, 387400104, 1162261464, 3486725280, 10460350992, 31380882456, 94143178824, 282428998560, 847288609200, 2541864234000, 7625597465304
Offset: 0
-
with(numtheory):
a:= n-> `if`(n=0, 1, add(mobius(d)*3^(n/d), d=divisors(n))):
seq(a(n), n=0..30); # Alois P. Heinz, Oct 21 2012
-
a[0] = 1; a[n_] := Sum[MoebiusMu[d]*3^(n/d), {d, Divisors[n]}]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Mar 11 2014, after Alois P. Heinz *)
-
a(n) = if(n==0,1,sumdiv(n,d, moebius(d) * 3^(n/d) )); \\ Joerg Arndt, Apr 14 2013
A054719
Number of 4-ary sequences with primitive period n.
Original entry on oeis.org
1, 4, 12, 60, 240, 1020, 4020, 16380, 65280, 262080, 1047540, 4194300, 16772880, 67108860, 268419060, 1073740740, 4294901760, 17179869180, 68719210560, 274877906940, 1099510578960, 4398046494660, 17592181850100, 70368744177660, 281474959868160
Offset: 0
-
A054719 := proc(n) local d,s; if n = 0 then RETURN(1); else s := 0; for d in divisors(n) do s := s+mobius(d)*4^(n/d); od; RETURN(s); fi; end;
-
a[0] = 1; a[n_] := Sum[MoebiusMu[d]*4^(n/d), {d, Divisors[n]}]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Mar 11 2014 *)
A054720
Number of 5-ary sequences with primitive period n.
Original entry on oeis.org
1, 5, 20, 120, 600, 3120, 15480, 78120, 390000, 1953000, 9762480, 48828120, 244124400, 1220703120, 6103437480, 30517574880, 152587500000, 762939453120, 3814695297000, 19073486328120, 95367421874400, 476837158124880, 2384185742187480, 11920928955078120
Offset: 0
- E. N. Gilbert and J. Riordan, Symmetry types of periodic sequences, Illinois J. Math., 5 (1961), 657-665.
-
with(numtheory):
a:= n-> `if`(n=0, 1, add(mobius(d)*5^(n/d), d=divisors(n))):
seq(a(n), n=0..30); # Alois P. Heinz, Oct 21 2012
-
a[0] = 1; a[n_] := Sum[MoebiusMu[d]*5^(n/d), {d, Divisors[n]}]; Table[a[n], {n, 0, 23}] (* Jean-François Alcover, Mar 11 2014 *)
A284871
Array read by antidiagonals: T(n,k) = number of primitive (aperiodic) reversible strings of length n using a maximum of k different symbols.
Original entry on oeis.org
1, 2, 0, 3, 1, 0, 4, 3, 4, 0, 5, 6, 15, 7, 0, 6, 10, 36, 39, 18, 0, 7, 15, 70, 126, 132, 29, 0, 8, 21, 120, 310, 540, 357, 70, 0, 9, 28, 189, 645, 1620, 2034, 1131, 126, 0, 10, 36, 280, 1197, 3990, 7790, 8316, 3276, 266, 0
Offset: 1
Table starts:
1 2 3 4 5 6 7 8 ...
0 1 3 6 10 15 21 28 ...
0 4 15 36 70 120 189 280 ...
0 7 39 126 310 645 1197 2044 ...
0 18 132 540 1620 3990 8568 16632 ...
0 29 357 2034 7790 23295 58779 131012 ...
0 70 1131 8316 39370 140610 412965 1050616 ...
0 126 3276 32760 195300 839790 2882376 8388576 ...
...
- 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]
-
b[n_, k_] := (k^n + k^Ceiling[n/2])/2;
a[n_, k_] := DivisorSum[n, MoebiusMu[n/#] b[#, k]&];
Table[a[n-k+1, k], {n, 1, 10}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Jun 05 2017, translated from PARI *)
-
b(n,k) = (k^n + k^(ceil(n/2))) / 2;
a(n,k) = sumdiv(n,d, moebius(n/d) * b(d,k));
for(n=1, 10, for(k=1, 10, print1( a(n,k),", ");); print(););
A054721
Number of 6-ary sequences with primitive period n.
Original entry on oeis.org
1, 6, 30, 210, 1260, 7770, 46410, 279930, 1678320, 10077480, 60458370, 362797050, 2176734420, 13060694010, 78363884130, 470184976590, 2821108227840, 16926659444730, 101559946544280, 609359740010490, 3656158379595540, 21936950640097710, 131621703479470050
Offset: 0
-
with(numtheory):
a:= n-> `if`(n=0, 1, add(mobius(d)*6^(n/d), d=divisors(n))):
seq(a(n), n=0..30); # Alois P. Heinz, Oct 21 2012
-
a[0] = 1; a[n_] := Sum[MoebiusMu[d]*6^(n/d), {d, Divisors[n]}]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Mar 11 2014 *)
A143328
Table T(n,k) read by antidiagonals. T(n,k) is the number of primitive (=aperiodic) k-ary Lyndon words (n,k >= 1) with length less than or equal to n.
Original entry on oeis.org
1, 2, 1, 3, 3, 1, 4, 6, 5, 1, 5, 10, 14, 8, 1, 6, 15, 30, 32, 14, 1, 7, 21, 55, 90, 80, 23, 1, 8, 28, 91, 205, 294, 196, 41, 1, 9, 36, 140, 406, 829, 964, 508, 71, 1, 10, 45, 204, 728, 1960, 3409, 3304, 1318, 127, 1, 11, 55, 285, 1212, 4088, 9695, 14569, 11464, 3502, 226, 1
Offset: 1
T(3,2) = 5, because 5 words of length <=3 over 2-letter alphabet {a,b} are primitive Lyndon words: a, b, ab, aab, abb.
Table begins:
1, 2, 3, 4, 5, ...
1, 3, 6, 10, 15, ...
1, 5, 14, 30, 55, ...
1, 8, 32, 90, 205, ...
1, 14, 80, 294, 829, ...
-
with(numtheory):
f0:= proc(n) option remember; unapply(k^n-add(f0(d)(k),
d=divisors(n)minus{n}), k)
end:
f2:= proc(n) option remember; unapply(f0(n)(x)/n, x) end:
g2:= proc(n) option remember; unapply(add(f2(j)(x), j=1..n), x) end:
T:= (n,k)-> g2(n)(k):
seq(seq(T(n, 1+d-n), n=1..d), d=1..12);
-
f0[n_] := f0[n] = Function[k, k^n-Sum[f0[d][k], {d, Divisors[n]//Most}]]; f2[n_] := f2[n] = Function[x, f0[n][x]/n]; g2[n_] := g2[n] = Function[x, Sum[f2[j][x], {j, 1, n}]]; T[n_, k_] := g2[n][k]; Table[T[n, 1+d-n], {d, 1, 12}, {n, 1, d}]//Flatten (* Jean-François Alcover, Feb 12 2014, translated from Maple *)
Showing 1-10 of 26 results.
Next
Comments