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

A074650 Table T(n,k) read by downward antidiagonals: number of Lyndon words (aperiodic necklaces) with n beads of k colors, n >= 1, k >= 1.

Original entry on oeis.org

1, 2, 0, 3, 1, 0, 4, 3, 2, 0, 5, 6, 8, 3, 0, 6, 10, 20, 18, 6, 0, 7, 15, 40, 60, 48, 9, 0, 8, 21, 70, 150, 204, 116, 18, 0, 9, 28, 112, 315, 624, 670, 312, 30, 0, 10, 36, 168, 588, 1554, 2580, 2340, 810, 56, 0, 11, 45, 240, 1008, 3360, 7735, 11160, 8160, 2184, 99, 0
Offset: 1

Views

Author

Christian G. Bower, Aug 28 2002

Keywords

Comments

D. E. Knuth uses the term 'prime strings' for Lyndon words because of the fundamental theorem stating the unique factorization of strings into nonincreasing prime strings (see Knuth 7.2.1.1). With this terminology T(n,k) is the number of k-ary n-tuples (a_1,...,a_n) such that the string a_1...a_n is prime. - Peter Luschny, Aug 14 2012
Also, for k a power of a prime, the number of monic irreducible polynomials of degree n over GF(k). - Andrew Howroyd, Dec 23 2017
An equivalent description: Array read by antidiagonals: T(n,k) = number of conjugacy classes of primitive words of length k >= 1 over an alphabet of size n >= 1.
There are a few incorrect values in Table 1 in the Perrin-Reutenauer paper (Christophe Reutenauer, personal communication), see A294438. - Lars Blomberg, Dec 05 2017
The fact that T(3,4) = 20 coincides with the number of the amino acids encoded by DNA made Francis Crick, John Griffith and Leslie Orgel conjecture in 1957 that the genetic code is a comma-free code, which later turned out to be false. [Hayes] - Andrey Zabolotskiy, Mar 24 2018

Examples

			T(4, 3) counts the 18 ternary prime strings of length 4 which are: 0001, 0002, 0011, 0012, 0021, 0022, 0102, 0111, 0112, 0121, 0122, 0211, 0212, 0221, 0222, 1112, 1122, 1222.
Square array starts:
  1,  2,   3,    4,     5,     6,      7, ...
  0,  1,   3,    6,    10,    15,     21, ...
  0,  2,   8,   20,    40,    70,    112, ...
  0,  3,  18,   60,   150,   315,    588, ...
  0,  6,  48,  204,   624,  1554,   3360, ...
  0,  9, 116,  670,  2580,  7735,  19544, ...
  0, 18, 312, 2340, 11160, 39990, 117648, ...
  ...
The transposed array starts:
   1  0  0     0     0      0       0        0         0          0,
   2  1  2     3     6      9      18       30        56         99,
   3  3  8    18    48    116     312      810      2184       5880,
   4  6  20   60   204    670    2340     8160     29120     104754,
   5 10  40  150   624   2580   11160    48750    217000     976248,
   6 15  70  315  1554   7735   39990   209790   1119720    6045837,
   7 21 112  588  3360  19544  117648   720300   4483696   28245840,
   8 28 168 1008  6552  43596  299592  2096640  14913024  107370900,
   9 36 240 1620 11808  88440  683280  5380020  43046640  348672528,
  10 45 330 2475 19998 166485 1428570 12498750 111111000  999989991,
  11 55 440 3630 32208 295020 2783880 26793030 261994040 2593726344,
  12 66 572 5148 49764 497354 5118828 53745120 573308736 6191711526,
  ...
The initial antidiagonals are:
   1
   2  0
   3  1   0
   4  3   2    0
   5  6   8    3    0
   6 10  20   18    6     0
   7 15  40   60   48     9     0
   8 21  70  150  204   116    18     0
   9 28 112  315  624   670   312    30     0
  10 36 168  588 1554  2580  2340   810    56    0
  11 45 240 1008 3360  7735 11160  8160  2184   99   0
  12 55 330 1620 6552 19544 39990 48750 29120 5880 186 0
		

References

  • F. Bergeron, G. Labelle and P. Leroux, Combinatorial Species and Tree-Like Structures, Cambridge, 1998, p. 97 (2.3.74)
  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, p. 495.
  • D. E. Knuth, Generating All Tuples and Permutations. The Art of Computer Programming, Vol. 4, Fascicle 2, pp. 26-27, Addison-Wesley, 2005.

Crossrefs

Columns k: A001037 (k=2), A027376 (k=3), A027377 (k=4), A001692 (k=5), A032164 (k=6), A001693 (k=7), A027380 (k=8), A027381 (k=9), A032165 (k=10), A032166 (k=11), A032167 (k=12), A060216 (k=13), A060217 (k=14), A060218 (k=15), A060219 (k=16), A060220 (k=17), A060221 (k=18), A060222 (k=19).
Rows n: A000027 (n=1), A000217(k-1) (n=2), A007290(k+1) (n=3), A006011 (n=4), A208536(k+1) (n=5), A292350 (n=6), A208537(k+1) (n=7).
Cf. A000010, A008683, A075147 (main diagonal), A102659, A215474 (preprime strings), A383011.

Programs

  • Magma
    t:= func< n,k | (&+[MoebiusMu(Floor(n/d))*k^d: d in Divisors(n)])/n >; // array
    A074650:= func< n,k | t(k, n-k+1) >; // downward diagonals
    [A074650(n,k): k in [1..n], n in [1..15]]; // G. C. Greubel, Aug 01 2024
  • Maple
    with(numtheory):
    T:= proc(n, k) add(mobius(n/d)*k^d, d=divisors(n))/n end:
    seq(seq(T(i, 1+d-i), i=1..d), d=1..11);  # Alois P. Heinz, Mar 28 2008
  • Mathematica
    max = 12; t[n_, k_] := Total[ MoebiusMu[n/#]*k^# & /@ Divisors[n]]/n; Flatten[ Table[ t[n-k+1, k], {n, 1, max}, {k, n, 1, -1}]] (* Jean-François Alcover, Oct 18 2011, after Maple *)
  • PARI
    T(n,k)=sumdiv(n,d,moebius(n/d)*k^d)/n \\ Charles R Greathouse IV, Oct 18 2011
    
  • Sage
    # This algorithm generates and counts all k-ary n-tuples (a_1,..,a_n) such
    # that the string a_1...a_n is prime. It is algorithm F in Knuth 7.2.1.1.
    def A074650(n, k):
        a = [0]*(n+1); a[0]=-1
        j = 1; count = 0
        while(j != 0) :
            if j == n : count += 1; # print("".join(map(str,a[1:])))
            else: j = n
            while a[j] >= k-1 : j -= 1
            a[j] += 1
            for i in (j+1..n): a[i] = a[i-j]
        return count   # Peter Luschny, Aug 14 2012
    

Formula

T(n,k) = (1/n) * Sum_{d|n} mu(n/d)*k^d.
T(n,k) = (k^n - Sum_{dAlois P. Heinz, Mar 28 2008
From Richard L. Ollerton, May 10 2021: (Start)
T(n,k) = (1/n)*Sum_{i=1..n} mu(gcd(n,i))*k^(n/gcd(n,i))/phi(n/gcd(n,i)).
T(n,k) = (1/n)*Sum_{i=1..n} mu(n/gcd(n,i))*k^gcd(n,i)/phi(n/gcd(n,i)). (End)
From Seiichi Manyama, Apr 12 2025: (Start)
G.f. of column k: -Sum_{j>=1} mu(j) * log(1 - k*x^j) / j.
Product_{n>=1} 1/(1 - x^n)^T(n,k) = 1/(1 - k*x). (End)

A032170 "CHK" (necklace, identity, unlabeled) transform of 1, 2, 3, 4, ...

Original entry on oeis.org

1, 2, 5, 10, 24, 50, 120, 270, 640, 1500, 3600, 8610, 20880, 50700, 124024, 304290, 750120, 1854400, 4600200, 11440548, 28527320, 71289000, 178526880, 447910470, 1125750120, 2833885800, 7144449920, 18036373140, 45591631800, 115381697740, 292329067800
Offset: 1

Views

Author

Keywords

Comments

Apparently, for n > 2, the same as A072337. - Ralf Stephan, Feb 01 2004
a(n) is the number of prime period-n periodic orbits of Arnold's cat map. - Bruce Boghosian, Apr 26 2009
From Petros Hadjicostas, Nov 17 2017: (Start)
A first proof of the g.f., given below, can be obtained using the first of Vladeta Jovovic's formulae. If b(n) = A004146(n), then B(x) = Sum_{n >= 1} b(n)*x^n = x*(1 + x)/((1 - x)*(1 - 3*x + x^2)) (see the documentation for sequence A004146). From Jovovich's first formula, A(x) = Sum_{n >= 1} a(n)*x^n = Sum_{n >= 1} (1/n)*Sum_{d | n} mu(d)*b(n/d)*x^n. Letting m = n/d, we get A(x) = Sum_{d >= 1} (mu(d)/d)*Sum_{m >= 1} b(m)*(x^d)^m/m = Sum_{d >= 1} (mu(d)/d)*f(x^d), where f(y) = Sum_{m >= 1} b(m)*y^m/m = int(B(w)/w, w = 0..y) = int((1 + w)/((1 - w)*(1 - 3*w + w^2)), w = 0..y) = log((1 - y)^2/(1 - 3*y + y^2)) for |y| < (3 - sqrt(5))/2.
A second proof of the g.f. can be obtained using C. G. Bower's definition of the CHK transform of a sequence (e(n): n>=1) with g.f. E(x) (see the links below). If (c_k(n): n >= 1) = CHK_k(e(n): n >= 1), then (c_k(n): n >= 1) = (1/k)*(MOEBIUS*AIK)k (e_n: n >= 1) = (1/k)*Sum{d | gcd(n,k)} mu(d)*AIK_{k/d}(e(n/d): n multiple of d), where the * between MOEBIUS and AIK denotes Dirichlet convolution and (d_k(n): n >= 1) = AIK_k(e(n): n >= 1) has g.f. E(x)^k. (There is a typo in the given definition of CHK in the link.)
If C(x) is the g.f. of CHK(e(n): n >= 1) = Sum_{k = 1..n} CHK_k(e(n): n >= 1), then C(x) = Sum_{n>=1} Sum_{k = 1..n} c_k(n)*x^n = Sum_{k >= 1} (1/k) Sum_{n >= k} Sum_{d | gcd(n,k)} mu(d)*d_{k/d}(n/d)*x^n. Letting m = n/d and s = k/d and using the fact that E(0) = 0, we get C(x) = Sum_{d >= 1} (mu(d)/d)*Sum_{s >= 1} (1/s)*Sum_{m >= s} d_s(m)*(x^d)^m = Sum_{d >= 1} (mu(d)/d)*Sum_{s >= 1} E(x^d)^s. Thus, C(x) = -Sum_{d >= 1} (mu(d)/d)*log(1 - E(x^d)).
For the sequence (e(n): n >= 1) = (n: n >= 1), we have E(x) = Sum_{n>=1} n*x^n = x/(1 - x)^2, and thus A(x) = C(x) = -Sum_{d >= 1} (mu(d)/d)*log(1 - x/(1-x)^2), from which we can easily get the g.f. given in the formula section.
Apparently, for this sequence and for sequences A032165, A032166, A032167, the author assumes that C(0) = 0 (i.e., he assumes the CHK transform has no constant term), while for sequences A032164, A108529, and possibly others, he assumes that the CHK transform starts with the constant term 1 (i.e., he assumes C(x) = 1 - Sum_{d >= 1} (mu(d)/d)*log(1 - E(x^d))). (End)
From Petros Hadjicostas, Jul 13 2020: (Start)
We elaborate further on Michel Marcus's claim below. Consider his sequence (b(n): n >= 1) with b(1) = 3 and b(n) = a(n) for n >= 2.
Using the identity -Sum_{k >= 1} (mu(k)/k)*log(1 - x^k) = x for |x| < 1 and the g.f. of (a(n): n >= 1) below, we see that Sum_{n >= 1} b(n)*x^n = 3*x - a(1)*x + Sum_{n >= 1} a(n)*x^n = 2*x + Sum_{k >= 1} (mu(k)/k)*(2*log(1 - x^k) - log(1 - 3*x^k + x^(2*k))) = -Sum_{k >= 1} (mu(k)/k)*log(1 - 3*x^k + x^(2*k)).
Following Kam Cheong Au (2020), let d(w,N) be the dimension of the Q-span of weight w and level N of colored multiple zeta values (CMZV). Here Q are the rational numbers.
Deligne's bound says that d(w,N) <= D(w,N), where 1 + Sum_{w >= 1} D(w,N)*t^w = (1 - a*t + b*t^2)^(-1) when N >= 3, where a = phi(N)/2 + omega(N) and b = omega(N) - 1 (with omega(N) being the number of distinct primes of N).
For N = 6, a = phi(6)/2 + omega(6) = 2/2 + 2 = 3 and b = omega(6) - 1 = 1. It follows that D(w, N=6) = A001906(w+1) = Fibonacci(2*(w+1)).
For some reason, Kam Cheong Au (2020) assumes Deligne's bound is tight, i.e., d(w,N) = D(w,N). He sets Sum_{w >= 1} c(w,N)*t^w = log(1 + Sum_{w >= 1} d(w,N)*t^w) = log(1 + Sum_{w >= 1} D(w,N)*t^w) = -log(1 - a*t + b*t^2) for N >= 3.
For N = 6, we get that c(w, N=6) = A005248(w)/w.
He defines d*(w,N) = Sum_{k | w} (mu(k)/k)*c(w/k,N) to be the "number of primitive constants of weight w and level N". (Using the terminology of A113788, we may perhaps call d*(w,N) the number of irreducible colored multiple zeta values at weight w and level N.)
Using standard techniques of the theory of g.f.'s, we can prove that Sum_{w >= 1} d*(w,N)*t^w = Sum_{s >= 1} (mu(s)/s) Sum_{k >= 1} c(k,N)*(t^s)^k = -Sum_{s >= 1} (mu(s)/s)*log(1 - a*t^s + b*t^(2*s)).
For N = 6, we saw that a = 3 and b = 1, and hence d*(w, N=6) = b(w) for w >= 1 (as claimed by Michel Marcus below). See Table 1 on p. 6 in Kam Cheong Au (2020). (End)

Crossrefs

Programs

  • Mathematica
    Table[DivisorSum[n, MoebiusMu[n/#] (LucasL[2 #] - 2) &]/n, {n, 31}] (* Michael De Vlieger, Nov 18 2017 *)

Formula

a(n) = (1/n)*Sum_{d | n} mu(n/d)*A004146(d). - Vladeta Jovovic, Feb 15 2003
Inverse EULER transform of Fibonacci(2*n). - Vladeta Jovovic, May 04 2006
G.f.: Sum_{n >= 1} (mu(n)/n)*f(x^n), where f(y) = log((1 - y)^2/(1 - 3*y + y^2)). - Petros Hadjicostas, Nov 17 2017
It appears that the sequence b(1) = 3, b(n) = a(n) for n >= 2 is related to the rational sequence (c(w, N=6): w >= 1) = (A005248(w)/w: w >= 1) whose g.f. is log(1/(1 - a*t + b*t^2)), where a = phi(N)/2 + omega(N) and b = omega(N) - 1 when N = 6, where phi is A000010 and omega is A001221. See Kam Cheong Au (2020). - Michel Marcus, Jul 13 2020 [Edited by Petros Hadjicostas, Jul 13 2020]
Showing 1-2 of 2 results.