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

A027376 Number of ternary irreducible monic polynomials of degree n; dimensions of free Lie algebras.

Original entry on oeis.org

1, 3, 3, 8, 18, 48, 116, 312, 810, 2184, 5880, 16104, 44220, 122640, 341484, 956576, 2690010, 7596480, 21522228, 61171656, 174336264, 498111952, 1426403748, 4093181688, 11767874940, 33891544368, 97764009000, 282429535752, 817028131140, 2366564736720, 6863037256208, 19924948267224, 57906879556410
Offset: 0

Views

Author

Keywords

Comments

Number of Lyndon words of length n on {1,2,3}. A Lyndon word is primitive (not a power of another word) and is earlier in lexicographic order than any of its cyclic shifts. - John W. Layman, Jan 24 2006
Exponents in an expansion of the Hardy-Littlewood constant Product(1 - (3*p - 1)/(p - 1)^3, p prime >= 5), whose decimal expansion is in A065418: the constant equals Product_{n >= 2} (zeta(n)*(1 - 2^(-n))*(1 - 3^(-n)))^(-a(n)). - Michael Somos, Apr 05 2003
Number of aperiodic necklaces with n beads of 3 colors. - Herbert Kociemba, Nov 25 2016
Number of irreducible harmonic polylogarithms, see page 299 of Gehrmann and Remiddi reference and table 1 of Maître article. - F. Chapoton, Aug 09 2021
For n>=2, a(n) is the number of Hesse loops of length 2*n, see Theorem 22 of Dutta, Halbeisen, Hungerbühler link. - Sayan Dutta, Sep 22 2023
For n>=2, a(n) is the number of orbits of size n of isomorphism classes of elliptic curves under the Hesse derivative, see Theorem 2 of Kettinger link. - Jake Kettinger, Aug 07 2024

Examples

			For n = 2 the a(2)=3 polynomials are  x^2+1, x^2+x+2, x^2+2*x+2. - _Robert Israel_, Dec 16 2015
		

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

Programs

  • Maple
    with(numtheory): A027376 := n -> `if`(n = 0, 1,
    add(mobius(d)*3^(n/d), d = divisors(n))/n):
    seq(A027376(n), n = 0..32);
  • Mathematica
    a[0]=1; a[n_] := Module[{ds=Divisors[n], i}, Sum[MoebiusMu[ds[[i]]]3^(n/ds[[i]]), {i, 1, Length[ds]}]/n]
    a[0]=1; a[n_] := DivisorSum[n, MoebiusMu[n/#]*3^#&]/n; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Dec 01 2015 *)
    mx=40;f[x_,k_]:=1-Sum[MoebiusMu[i] Log[1-k*x^i]/i,{i,1,mx}];CoefficientList[Series[f[x,3],{x,0,mx}],x] (* Herbert Kociemba, Nov 25 2016 *)
  • PARI
    a(n)=if(n<1,n==0,sumdiv(n,d,moebius(n/d)*3^d)/n)

Formula

a(n) = (1/n)*Sum_{d|n} mu(d)*3^(n/d).
(1 - 3*x) = Product_{n>0} (1 - x^n)^a(n).
G.f.: k = 3, 1 - Sum_{i >= 1} mu(i)*log(1 - k*x^i)/i. - Herbert Kociemba, Nov 25 2016
a(n) ~ 3^n / n. - Vaclav Kotesovec, Jul 01 2018
a(n) = 2*A046211(n) + A046209(n). - R. J. Mathar, Oct 21 2021

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

A034741 Dirichlet convolution of mu(n) with 3^(n-1).

Original entry on oeis.org

1, 2, 8, 24, 80, 232, 728, 2160, 6552, 19600, 59048, 176880, 531440, 1593592, 4782880, 14346720, 43046720, 129133368, 387420488, 1162241760, 3486783664, 10460294152, 31381059608, 94142999520, 282429536400, 847288078000, 2541865821768, 7625595890640, 22876792454960
Offset: 1

Keywords

Crossrefs

Column k=3 of A143325.
First differences of A320087.
Cf. A054718.

Programs

  • Mathematica
    nmax = 20; Rest[CoefficientList[Series[Sum[MoebiusMu[k] * x^k / (1 - 3*x^k), {k, 1, nmax}], {x, 0, nmax}], x]] (* Vaclav Kotesovec, Dec 11 2020 *)
  • PARI
    a(n) = sumdiv(n,d, moebius(d) * 3^(n/d-1) ); \\ Joerg Arndt, Apr 14 2013

Formula

G.f.: Sum_{k>=1} mu(k)*x^k/(1 - 3*x^k). - Ilya Gutkovskiy, Oct 25 2018
a(n) ~ 3^(n-1). - Vaclav Kotesovec, Sep 11 2019

A286247 Triangular table: T(n,k) = 0 if k does not divide n, otherwise T(n,k) = P(A046523(k), n/k), where P is sequence A000027 used as a pairing function N x N -> N. Table is read by rows as T(1,1), T(2,1), T(2,2), etc.

Original entry on oeis.org

1, 2, 3, 4, 0, 3, 7, 5, 0, 10, 11, 0, 0, 0, 3, 16, 8, 5, 0, 0, 21, 22, 0, 0, 0, 0, 0, 3, 29, 12, 0, 14, 0, 0, 0, 36, 37, 0, 8, 0, 0, 0, 0, 0, 10, 46, 17, 0, 0, 5, 0, 0, 0, 0, 21, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 67, 23, 12, 19, 0, 27, 0, 0, 0, 0, 0, 78, 79, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 92, 30, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 21, 106, 0, 17, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21
Offset: 1

Author

Antti Karttunen, May 06 2017

Keywords

Comments

Equally: square array A(n,k) = P(A046523(n), (n+k-1)/n) if n divides (n+k-1), 0 otherwise, read by descending antidiagonals as A(1,1), A(1,2), A(2,1), etc. Here P is a two-argument form of sequence A000027 used as a pairing function N x N -> N.
When viewed as a triangular table, this sequence packs the values of A046523(k) [which essentially stores the prime signature of k] and quotient n/k (when it is integral) to a single value with the pairing function A000027. The two "components" can be accessed with functions A002260 & A004736, which allows us to generate from this sequence (among other things) various sums related to the enumeration of aperiodic necklaces, because Moebius mu (A008683) obtains the same value on any representative of the same prime signature.
For example, we have:
Sum_{i=A000217(n-1) .. A000217(n)} [a(i) > 0] * mu(A002260(a(i))) * 2^(A004736(a(i))) = A027375(n).
and
Sum_{i=A000217(n-1) .. A000217(n)} [a(i) > 0] * mu(A002260(a(i))) * 3^(A004736(a(i))) = A054718(n).
Triangle A286249 has the same property.

Examples

			The first fifteen rows of triangle:
    1,
    2,  3,
    4,  0,  3,
    7,  5,  0, 10,
   11,  0,  0,  0,  3,
   16,  8,  5,  0,  0, 21,
   22,  0,  0,  0,  0,  0,  3,
   29, 12,  0, 14,  0,  0,  0, 36,
   37,  0,  8,  0,  0,  0,  0,  0, 10,
   46, 17,  0,  0,  5,  0,  0,  0,  0, 21,
   56,  0,  0,  0,  0,  0,  0,  0,  0,  0, 3,
   67, 23, 12, 19,  0, 27,  0,  0,  0,  0,  0, 78,
   79,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  3,
   92, 30,  0,  0,  0,  0,  5,  0,  0,  0,  0,  0,  0, 21,
  106,  0, 17,  0,  8,  0,  0,  0,  0,  0,  0,  0,  0,  0, 21
  (Note how triangle A286249 contains on each row the same numbers
  in the same "divisibility-allotted" positions, but in reverse order).
  ---------------------------------------------------------------
In the following examples: a = this sequence interpreted as a one-dimensional sequence, T = interpreted as a triangular table, A = interpreted as a square array, P = A000027 interpreted as a two-argument pairing function N x N -> N.
---
a(7) = T(4,1) = A(1,4) = P(A046523(1),4/1) = P(1,4) = 1+(((1+4)^2 - 1 - (3*4))/2) = 7.
a(30) = T(8,2) = A(2,7) = P(A046523(2),8/2) = P(2,4) = (1/2)*(2 + ((2+4)^2) - 2 - 3*4) = 12.
		

Crossrefs

Cf. A000124 (left edge of the triangle), A000217 (every number at the right edge is a triangular number).

Programs

  • Python
    from sympy import factorint
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)//2
    def P(n):
        f = factorint(n)
        return sorted([f[i] for i in f])
    def a046523(n):
        x=1
        while True:
            if P(n) == P(x): return x
            else: x+=1
    def t(n, k): return 0 if n%k!=0 else T(a046523(k), n//k)
    for n in range(1, 21): print([t(n, k) for k in range(1, n + 1)]) # Indranil Ghosh, May 08 2017
  • Scheme
    (define (A286247 n) (A286247bi (A002260 n) (A004736 n)))
    (define (A286247bi row col) (if (not (zero? (modulo (+ row col -1) row))) 0 (let ((a (A046523 row)) (b (quotient (+ row col -1) row))) (* (/ 1 2) (+ (expt (+ a b) 2) (- a) (- (* 3 b)) 2)))))
    ;; Alternatively, with triangular indexing:
    (define (A286247 n) (A286247tr (A002024 n) (A002260 n)))
    (define (A286247tr n k) (if (not (zero? (modulo n k))) 0 (let ((a (A046523 k)) (b (/ n k))) (* (/ 1 2) (+ (expt (+ a b) 2) (- a) (- (* 3 b)) 2)))))
    

Formula

As a triangle (with n >= 1, 1 <= k <= n):
T(n,k) = 0 if k does not divide n, otherwise T(n,k) = (1/2)*(2 + ((A046523(k)+(n/k))^2) - A046523(k) - 3*(n/k)).
T(n,k) = A051731(n,k) * A286245(n,k).

A286249 Triangular table: T(n,k) = 0 if k does not divide n, otherwise T(n,k) = P(A046523(n/k), k), where P is sequence A000027 used as a pairing function N x N -> N. Table is read by rows as T(1,1), T(2,1), T(2,2), etc.

Original entry on oeis.org

1, 3, 2, 3, 0, 4, 10, 5, 0, 7, 3, 0, 0, 0, 11, 21, 5, 8, 0, 0, 16, 3, 0, 0, 0, 0, 0, 22, 36, 14, 0, 12, 0, 0, 0, 29, 10, 0, 8, 0, 0, 0, 0, 0, 37, 21, 5, 0, 0, 17, 0, 0, 0, 0, 46, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, 78, 27, 19, 12, 0, 23, 0, 0, 0, 0, 0, 67, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, 21, 5, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 92, 21, 0, 8, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 106
Offset: 1

Author

Antti Karttunen, May 06 2017

Keywords

Comments

This sequence packs the values of A046523(n/k) and k (whenever k divides n) to a single term with the pairing function A000027. The two "components" can be accessed with functions A002260 & A004736, which allows us to generate from this sequence (among other things) various sums related to the enumeration of aperiodic necklaces, because Moebius mu (A008683) obtains the same value on any representative of the same prime signature.
For example, we have:
Sum_{i=A000217(n-1) .. A000217(n)} [a(i) > 0] * mu(A002260(a(i))) * 2^(A004736(a(i))) = A027375(n).
and
Sum_{i=A000217(n-1) .. A000217(n)} [a(i) > 0] * mu(A002260(a(i))) * 3^(A004736(a(i))) = A054718(n).
Triangle A286247 has the same property.

Examples

			The first fifteen rows of triangle:
   1,
   3,  2,
   3,  0,  4,
  10,  5,  0,  7,
   3,  0,  0,  0, 11,
  21,  5,  8,  0,  0, 16,
   3,  0,  0,  0,  0,  0, 22,
  36, 14,  0, 12,  0,  0,  0, 29,
  10,  0,  8,  0,  0,  0,  0,  0, 37,
  21,  5,  0,  0, 17,  0,  0,  0,  0, 46,
   3,  0,  0,  0,  0,  0,  0,  0,  0,  0, 56,
  78, 27, 19, 12,  0, 23,  0,  0,  0,  0,  0, 67,
   3,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 79,
  21,  5,  0,  0,  0,  0, 30,  0,  0,  0,  0,  0,  0, 92,
  21,  0,  8,  0, 17,  0,  0,  0,  0,  0,  0,  0,  0,  0, 106
  -------------------------------------------------------------
Note how triangle A286247 contains on each row the same numbers in the same "divisibility-allotted" positions, but in reverse order.
		

Crossrefs

Transpose: A286248 (triangle reversed).
Cf. A000124 (the right edge of the triangle).

Programs

  • Python
    from sympy import factorint
    import math
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)//2
    def P(n):
        f = factorint(n)
        return sorted([f[i] for i in f])
    def a046523(n):
        x=1
        while True:
            if P(n) == P(x): return x
            else: x+=1
    def t(n, k): return 0 if n%k!=0 else T(a046523(n//k), k)
    for n in range(1, 21): print([t(n, k) for k in range(1, n + 1)]) # Indranil Ghosh, May 08 2017
  • Scheme
    (define (A286249 n) (A286249tr (A002024 n) (A002260 n)))
    (define (A286249tr n k) (if (not (zero? (modulo n k))) 0 (let ((a (A046523 (/ n k))) (b k)) (* (/ 1 2) (+ (expt (+ a b) 2) (- a) (- (* 3 b)) 2)))))
    

Formula

As a triangle (with n >= 1, 1 <= k <= n):
T(n,k) = 0 if k does not divide n, otherwise T(n,k) = (1/2)*(2 + ((A046523(n/k)+k)^2) - A046523(n/k) - 3*k).

A056268 Number of primitive (aperiodic) words of length n which contain exactly three different symbols.

Original entry on oeis.org

0, 0, 6, 36, 150, 534, 1806, 5760, 18144, 55830, 171006, 518580, 1569750, 4732014, 14250450, 42844320, 128746950, 386615376, 1160688606, 3483582660, 10454059938, 31368305694, 94118013006, 282378679920, 847187946000, 2541662931990, 7625194813656, 22875982414740
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

Programs

  • PARI
    f(n) = 3^n - 3*2^n + 3;
    a(n) = sumdiv(n, d, moebius(d)*f(n/d)); \\ Michel Marcus, Mar 25 2022

Formula

a(n) = Sum_{d|n} mu(d)*A001117(n/d).

Extensions

a(11) and following corrected by Georg Fischer, Mar 24 2022

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

Original entry on oeis.org

1, 1, 4, 12, 40, 116, 364, 1080, 3276, 9800, 29524, 88440, 265720, 796796, 2391440, 7173360, 21523360, 64566684, 193710244, 581120880, 1743391832, 5230147076, 15690529804, 47071499760, 141214768200
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

Cf. A054718.

Formula

Sum mu(d)*A007051(n/d-1) where d|n and n>0.

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