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-7 of 7 results.

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).

Original entry on oeis.org

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

Views

Author

Alois P. Heinz, Aug 07 2008

Keywords

Comments

Column k is Dirichlet convolution of mu(n) with k^n.
The coefficients of the polynomial of row n are given by the n-th row of triangle A054525; for example row 4 has polynomial -k^2+k^4.

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, ...
		

Crossrefs

Rows n=1-10 give: A000027, A002378(k-1), A007531(k+1), A047928(k+1), A061167, A218130, A133499, A218131, A218132, A218133.
Main diagonal gives A252764.

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.

Original entry on oeis.org

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

Keywords

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.

Crossrefs

Column k=4 of A074650.

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) = A054661(n) + 3 * A054660(n). - Andrey Zabolotskiy, Dec 17 2020
a(n) = 2 * (A054664(n) + A054660(n)). - Andrey Zabolotskiy, Dec 19 2020
a(n) = A054719(n)/n, n>0. - R. J. Mathar, Dec 16 2024

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

Author

N. J. A. Sloane, Apr 20 2000

Keywords

Comments

Equivalently, output sequences with primitive period n from a simple cycling shift register.

Crossrefs

Column k=3 of A143324.

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).

Original entry on oeis.org

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

Author

Seiichi Manyama, Nov 23 2017

Keywords

Crossrefs

Sum_{d|n} mu(n/d)*k^(d-1): A000740 (k=2), A034741 (k=3), this sequence (k=4), A295506 (k=5).
Column k=4 of A143325.
First differences of A320088.
Cf. A054719.

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.

Original entry on oeis.org

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]

Crossrefs

Formula

sum mu(d)*A000919(n/d) where d|n.
Seems to be n * A056289.

A056275 Number of primitive (aperiodic) word structures of length n using a 4-ary alphabet.

Original entry on oeis.org

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]

Crossrefs

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.

Original entry on oeis.org

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

Author

Peter Luschny, Jul 04 2023

Keywords

Comments

Row n gives the number of n-ary sequences with primitive period k.
See A074650 and A143324 for combinatorial interpretations.

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;
		

Crossrefs

Variant: A143324.
Rows: A000007 (n=0), A019590 (n=1), A027375 (n=2), A054718 (n=3), A054719 (n=4), A054720, A054721, A218124, A218125.
Columns: A000012 (k=0), A001477 (k=1), A002378 (k=2), A007531(k=3), A047928, A061167, A218130, A133499, A218131.
Cf. A252764 (main diagonal), A074650, A363914.

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)

Formula

If k > 0 then k divides A(n, k), see the transposed array of A074650.
If k > 0 then n divides A(n, k), see the transposed array of A143325.
Showing 1-7 of 7 results.