A143324 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).
1, 2, 0, 3, 2, 0, 4, 6, 6, 0, 5, 12, 24, 12, 0, 6, 20, 60, 72, 30, 0, 7, 30, 120, 240, 240, 54, 0, 8, 42, 210, 600, 1020, 696, 126, 0, 9, 56, 336, 1260, 3120, 4020, 2184, 240, 0, 10, 72, 504, 2352, 7770, 15480, 16380, 6480, 504, 0, 11, 90, 720, 4032, 16800, 46410, 78120, 65280, 19656, 990, 0
Offset: 1
Examples
T(2,3)=6, because there are 6 primitive words of length 2 over 3-letter alphabet {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, ... 0, 2, 6, 12, 20, ... 0, 6, 24, 60, 120, ... 0, 12, 72, 240, 600, ... 0, 30, 240, 1020, 3120, ...
Links
- Alois P. Heinz, Antidiagonals n = 1..141, flattened
- C. J. Smyth, A coloring proof of a generalisation of Fermat's little theorem, Amer. Math. Monthly 93, No. 6 (1986), pp. 469-471.
- Lucas Vieira Barbosa, Nonclassical Temporal Correlations Under Finite-Memory Constraints, Doctoral Thesis, Univ. Wien (Austria 2024). See p. 35.
- Index entries for sequences related to Lyndon words
Crossrefs
Programs
-
Maple
with(numtheory): f0:= proc(n) option remember; unapply(k^n-add(f0(d)(k), d=divisors(n)minus{n}), k) end; T:= (n,k)-> f0(n)(k); seq(seq(T(n, 1+d-n), n=1..d), d=1..12);
-
Mathematica
f0[n_] := f0[n] = Function [k, k^n - Sum[f0[d][k], {d, Complement[Divisors[n], {n}]}]]; t[n_, k_] := f0[n][k]; Table[Table[t[n, 1 + d - n], {n, 1, d}], {d, 1, 12}] // Flatten (* Jean-François Alcover, Dec 12 2013, translated from Maple *)
Formula
T(n,k) = Sum_{d|n} k^d * mu(n/d).
T(n,k) = k^n - Sum_{d
T(n,k) = A143325(n,k) * k.
T(n,k) = A074650(n,k) * n.
So Sum_{d|n} k^d * mu(n/d) == 0 (mod n), this is a generalization of Fermat's little theorem k^p - k == 0 (mod p) for primes p to an arbitrary modulus n (see the Smyth link). - Franz Vrabec, Feb 09 2021
A027377 Number of irreducible polynomials of degree n over GF(4); dimensions of free Lie algebras.
1, 4, 6, 20, 60, 204, 670, 2340, 8160, 29120, 104754, 381300, 1397740, 5162220, 19172790, 71582716, 268431360, 1010580540, 3817733920, 14467258260, 54975528948, 209430785460, 799644629550, 3059510616420
Offset: 0
Comments
Apart from initial terms, exponents in expansion of A065419 as a product zeta(n)^(-a(n)).
Number of aperiodic necklaces with n beads of 4 colors. - Herbert Kociemba, Nov 25 2016
References
- E. R. Berlekamp, Algebraic Coding Theory, McGraw-Hill, NY, 1968, p. 84.
- M. Lothaire, Combinatorics on Words. Addison-Wesley, Reading, MA, 1983, p. 79.
Links
- Seiichi Manyama, Table of n, a(n) for n = 0..1666 (terms 0..200 from T. D. Noe)
- E. N. Gilbert and J. Riordan, Symmetry types of periodic sequences, Illinois J. Math., 5 (1961), 657-665.
- G. Niklasch, Some number theoretical constants: 1000-digit values [Cached copy]
- A. Pakapongpun and T. Ward, Functorial Orbit counting, JIS 12 (2009) 09.2.4, example 3.
- Y. Puri and T. Ward, Arithmetic and growth of periodic orbits, J. Integer Seqs., Vol. 4 (2001), #01.2.1.
- 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
Programs
-
Maple
A027377 := 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/n); fi; end;
-
Mathematica
a[n_] := Sum[MoebiusMu[d]*4^(n/d), {d, Divisors[n]}] / n; a[0] = 1; Table[a[n], {n, 0, 23}](* Jean-François Alcover, Nov 29 2011 *) mx=40;f[x_,k_]:=1-Sum[MoebiusMu[i] Log[1-k*x^i]/i,{i,1,mx}];CoefficientList[Series[f[x,4],{x,0,mx}],x] (* Herbert Kociemba, Nov 25 2016 *)
-
PARI
a(n)=if(n,sumdiv(n,d,moebius(d)<<(2*n/d))/n,1) \\ Charles R Greathouse IV, Nov 29 2011
Formula
a(n) = Sum_{d|n} mu(d)*4^(n/d)/n.
G.f.: k=4, 1 - Sum_{i>=1} mu(i)*log(1 - k*x^i)/i. - Herbert Kociemba, Nov 25 2016
a(n) = A054719(n)/n, n>0. - R. J. Mathar, Dec 16 2024
A054718 Number of ternary sequences with primitive period n.
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
Keywords
Comments
Equivalently, output sequences with primitive period n from a simple cycling shift register.
Links
- Seiichi Manyama, Table of n, a(n) for n = 0..2095 (terms 0..650 from Alois P. Heinz)
- E. N. Gilbert and J. Riordan, Symmetry types of periodic sequences, Illinois J. Math., 5 (1961), 657-665.
Programs
-
Maple
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
-
Mathematica
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 *)
-
PARI
a(n) = if(n==0,1,sumdiv(n,d, moebius(d) * 3^(n/d) )); \\ Joerg Arndt, Apr 14 2013
Formula
a(n) = Sum_{d|n} mu(d)*3^(n/d).
a(0) = 1, a(n) = n * A027376(n).
a(n) = 3 * A034741(n).
G.f.: 1 + 3 * Sum_{k>=1} mu(k) * x^k / (1 - 3*x^k). - Ilya Gutkovskiy, Apr 14 2021
A295505 a(n) = Sum_{d|n} mu(n/d)*4^(d-1).
1, 3, 15, 60, 255, 1005, 4095, 16320, 65520, 261885, 1048575, 4193220, 16777215, 67104765, 268435185, 1073725440, 4294967295, 17179802640, 68719476735, 274877644740, 1099511623665, 4398045462525, 17592186044415, 70368739967040, 281474976710400
Offset: 1
Keywords
Links
- Seiichi Manyama, Table of n, a(n) for n = 1..1661
Crossrefs
Programs
-
Mathematica
Table[Sum[MoebiusMu[n/d]4^(d-1),{d,Divisors[n]}],{n,30}] (* Harvey P. Dale, Nov 08 2020 *) nmax = 20; Rest[CoefficientList[Series[Sum[MoebiusMu[k] * x^k / (1 - 4*x^k), {k, 1, nmax}], {x, 0, nmax}], x]] (* Vaclav Kotesovec, Dec 11 2020 *)
-
PARI
{a(n) = sumdiv(n, d, moebius(n/d)*4^(d-1))}
Formula
a(n) = A054719(n)/4 for n > 0.
G.f.: Sum_{k>=1} mu(k)*x^k/(1 - 4*x^k). - Ilya Gutkovskiy, Oct 25 2018
A056269 Number of primitive (aperiodic) words of length n which contain exactly four different symbols.
0, 0, 0, 24, 240, 1560, 8400, 40800, 186480, 818280, 3498000, 14674440, 60780720, 249393480, 1016542560, 4123132800, 16664094960, 67171179600, 270232006800, 1085569963080, 4356217672800, 17466683473800
Offset: 1
Keywords
References
- 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]
A056275 Number of primitive (aperiodic) word structures of length n using a 4-ary alphabet.
1, 1, 4, 13, 50, 181, 714, 2780, 11046, 43895, 175274, 699875, 2798250, 11188191, 44747380, 178970560, 715860650, 2863365834, 11453377194, 45813202675, 183252461532, 733008625151, 2932033104554, 11728127521060, 46912504507000, 187649998452735, 750599971438464
Offset: 1
Keywords
Comments
Permuting the alphabet will not change a word structure. Thus aabc and bbca have the same structure.
References
- 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]
Formula
a(n) = Sum_{d|n} mu(d)*A007581(n/d-1).
A363916 Array read by descending antidiagonals. A(n, k) = Sum_{d=0..k} A363914(k, d) * n^d.
1, 0, 1, 0, 1, 1, 0, 0, 2, 1, 0, 0, 2, 3, 1, 0, 0, 6, 6, 4, 1, 0, 0, 12, 24, 12, 5, 1, 0, 0, 30, 72, 60, 20, 6, 1, 0, 0, 54, 240, 240, 120, 30, 7, 1, 0, 0, 126, 696, 1020, 600, 210, 42, 8, 1, 0, 0, 240, 2184, 4020, 3120, 1260, 336, 56, 9, 1
Offset: 0
Comments
Examples
Array A(n, k) starts: [0] 1, 0, 0, 0, 0, 0, 0, 0, 0, ... A000007 [1] 1, 1, 0, 0, 0, 0, 0, 0, 0, ... A019590 [2] 1, 2, 2, 6, 12, 30, 54, 126, 240, ... A027375 [3] 1, 3, 6, 24, 72, 240, 696, 2184, 6480, ... A054718 [4] 1, 4, 12, 60, 240, 1020, 4020, 16380, 65280, ... A054719 [5] 1, 5, 20, 120, 600, 3120, 15480, 78120, 390000, ... A054720 [6] 1, 6, 30, 210, 1260, 7770, 46410, 279930, 1678320, ... A054721 [7] 1, 7, 42, 336, 2352, 16800, 117264, 823536, 5762400, ... A218124 [8] 1, 8, 56, 504, 4032, 32760, 261576, 2097144, 16773120, ... A218125 A000012|A002378| A047928 | A218130 | A218131 A001477,A007531, A061167, A133499, (diagonal A252764) . Triangle T(n, k) starts: [0] 1; [1] 0, 1; [2] 0, 1, 1; [3] 0, 0, 2, 1; [4] 0, 0, 2, 3, 1; [5] 0, 0, 6, 6, 4, 1; [6] 0, 0, 12, 24, 12, 5, 1; [7] 0, 0, 30, 72, 60, 20, 6, 1; [8] 0, 0, 54, 240, 240, 120, 30, 7, 1;
Links
- E. N. Gilbert and J. Riordan, Symmetry types of periodic sequences, Illinois J. Math., 5 (1961), 657-665.
Crossrefs
Programs
-
Maple
A363916 := (n, k) -> local d; add(A363914(k, d) * n^d, d = 0 ..k): for n from 0 to 9 do seq(A363916(n, k), k = 0..8) od;
-
SageMath
def A363916(n, k): return sum(A363914(k, d) * n^d for d in range(k + 1)) for n in range(9): print([A363916(n, k) for k in srange(9)]) def T(n, k): return A363916(k, n - k)
Comments