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-10 of 21 results. Next

A058819 a(0) = 1, a(1) = 4; for n >= 2 a(n) is the number of degree-n monic reducible polynomials over GF(4), i.e., a(n) = 4^n - A027377(n).

Original entry on oeis.org

1, 4, 10, 44, 196, 820, 3426, 14044, 57376, 233024, 943822, 3813004, 15379476, 61946644, 249262666, 1002159108, 4026535936, 16169288644, 64901742816, 260410648684, 1044536098828, 4188615725644, 16792541414866, 67309233561244, 269746853382816, 1080863910568960, 4330384259668126
Offset: 0

Views

Author

Claude Lenormand (claude.lenormand(AT)free.fr), Jan 04 2001

Keywords

Comments

Dimensions of homogeneous subspaces of shuffle algebra over 4-letter alphabet (see A058766 for 2-letter case).

References

  • M. Lothaire, Combinatorics on words, Cambridge mathematical library, 1983, p. 126 (definition of shuffle algebra).

Crossrefs

Programs

  • Mathematica
    a[n_] := 4^n - DivisorSum[n, MoebiusMu[n/#] * 4^# &] / n; a[0] = 1; a[1] = 4; Array[a, 27, 0] (* Amiram Eldar, Aug 13 2023 *)
  • PARI
    a(n) = if (n<=1, 4^n, 4^n - sumdiv(n, d, moebius(d)*4^(n/d))/n); \\ Michel Marcus, Oct 30 2017

Extensions

Better description from Sharon Sela (sharonsela(AT)hotmail.com), Feb 19 2002
More terms from Michel Marcus, Oct 30 2017

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)

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

A060165 Number of orbits of length n under the map whose periodic points are counted by A000984.

Original entry on oeis.org

2, 2, 6, 16, 50, 150, 490, 1600, 5400, 18450, 64130, 225264, 800046, 2865226, 10341150, 37566720, 137270954, 504171432, 1860277042, 6892317200, 25631327190, 95640829922, 357975249026, 1343650040256, 5056424257500, 19073789328750, 72108867614796
Offset: 1

Views

Author

Thomas Ward, Mar 13 2001

Keywords

Comments

The sequence A000984 seems to record the number of points of period n under a map. The number of orbits of length n for this map gives the sequence above.
The number of n-cycles in the graph of overlapping m-permutations where n <= m. - Richard Ehrenborg, Dec 10 2013
a(n) is divisible by n (cf. A268619), 6*a(n) is divisible by n^2 (cf. A268592). - Max Alekseyev, Feb 09 2016
Apparently the number of Lyndon words of length n with a 4-letter alphabet (see A027377) where the first letter of the alphabet appears with the same frequency as the second of the alphabet. E.g a(1)=2 counts the words (2), (3), a(2)= 2 counts (01) (23), a(3)=6 counts (021) (031) (012) (013) (223) (233). R. J. Mathar, Nov 04 2021

Examples

			a(5) = 50 because if a map has A000984 as its periodic points, then it would have 2 fixed points and 252 points of period 5, hence 50 orbits of length 5.
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    a:= n-> add(mobius(n/d)*binomial(2*d, d), d=divisors(n))/n:
    seq(a(n), n=1..30); # Alois P. Heinz, Dec 10 2013
  • Mathematica
    a[n_] := (1/n)*Sum[MoebiusMu[d]*Binomial[2*n/d, n/d], {d, Divisors[n]}]; Table[a[n], {n, 1, 30}] (* Jean-François Alcover, Jul 16 2015 *)
  • PARI
    a(n)=sumdiv(n,d,moebius(n/d)*binomial(2*d,d))/n \\ Charles R Greathouse IV, Dec 10 2013
    
  • Python
    from sympy import mobius, binomial, divisors
    def a(n): return sum(mobius(n//d) * binomial(2*d, d) for d in divisors(n))//n
    print([a(n) for n in range(1, 31)])  # Indranil Ghosh, Jul 24 2017

Formula

a(n) = (1/n) * Sum_{d|n} mu(d) A000984(n/d) with mu = A008683.
a(n) = 2*A022553(n).
a(n) = A007727(n)/n. - R. J. Mathar, Jul 24 2017
G.f.: 2 * Sum_{k>=1} mu(k)*log((1 - sqrt(1 - 4*x^k))/(2*x^k))/k. - Ilya Gutkovskiy, May 18 2019
a(n) ~ 4^n / (sqrt(Pi) * n^(3/2)). - Vaclav Kotesovec, Aug 04 2022

A059886 a(n) = |{m : multiplicative order of 4 mod m=n}|.

Original entry on oeis.org

2, 2, 4, 4, 6, 16, 6, 8, 26, 38, 14, 68, 6, 54, 84, 16, 6, 462, 6, 140, 132, 110, 14, 664, 120, 118, 128, 188, 62, 4456, 6, 96, 364, 118, 498, 7608, 30, 118, 180, 568, 30, 9000, 30, 892, 3974, 494, 62, 5360, 24, 8024, 1524, 892, 62, 9600, 3050, 1784, 372, 446
Offset: 1

Views

Author

Vladeta Jovovic, Feb 06 2001

Keywords

Comments

The multiplicative order of a mod m, GCD(a,m)=1, is the smallest natural number d for which a^d = 1 (mod m).
a(n) is the number of orders of degree-n monic irreducible polynomials over GF(4).
Also, number of primitive factors of 4^n - 1. - Max Alekseyev, May 03 2022

Examples

			a(1) = |{1,3}| = 2, a(2) = |{5,15}| =2, a(3) = |{7,9,21,63}| =4, a(4) = |{17,51,85,255}| = 4.
		

Crossrefs

Number of primitive factors of b^n - 1: A059499 (b=2), A059885(b=3), this sequence (b=4), A059887 (b=5), A059888 (b=6), A059889 (b=7), A059890 (b=8), A059891 (b=9), A059892 (b=10).
Column k=4 of A212957.

Programs

  • Maple
    with(numtheory):
    a:= n-> add(mobius(n/d)*tau(4^d-1), d=divisors(n)):
    seq(a(n), n=1..60);  # Alois P. Heinz, Oct 12 2012
  • Mathematica
    a[n_] := DivisorSum[n, MoebiusMu[n/#]*DivisorSigma[0, 4^# - 1]&]; Array[a, 100] (* Jean-François Alcover, Nov 11 2015 *)
  • PARI
    a(n) = sumdiv(n, d, moebius(n/d) * numdiv(4^d-1)); \\ Amiram Eldar, Jan 25 2025

Formula

a(n) = Sum_{ d divides n } mu(n/d)*tau(4^d-1), (mu(n) = Moebius function A008683, tau(n) = number of divisors of n A000005).

A054660 Number of monic irreducible polynomials over GF(4) of degree n with fixed nonzero trace.

Original entry on oeis.org

1, 2, 5, 16, 51, 170, 585, 2048, 7280, 26214, 95325, 349520, 1290555, 4793490, 17895679, 67108864, 252645135, 954437120, 3616814565, 13743895344, 52357696365, 199911205050, 764877654105, 2932031006720, 11258999068416
Offset: 1

Views

Author

N. J. A. Sloane, Apr 18 2000

Keywords

Comments

Also number of Lyndon words of length n with trace 1 over GF(4).
Let x = RootOf( z^2+z+1 ) and y = 1+x. Also number of Lyndon words of length n with trace x over GF(4). Also number of Lyndon words of length n with trace y over GF(4).
Also number of 4-ary Lyndon words (i.e., Lyndon words over Z_4) of length n with trace 1 (mod 4). Also the same with trace 3 (mod 4). - Andrey Zabolotskiy, Dec 19 2020

Examples

			a(3; y)=5 since the five Lyndon words over GF(4) of trace y and length 3 are { 00y, 01x, 0x1, 11y, xxy }; the five Lyndon words over Z_4 of trace 1 (mod 4) and length 3 are { 001, 023, 032, 113, 122 }.
		

Crossrefs

Formula

From Seiichi Manyama, Mar 11 2018: (Start)
a(n) = A000048(2*n) = (1/(4*n)) * Sum_{odd d divides n} mu(d)*4^(n/d), where mu is the Möbius function A008683.
a(n+1) = A300628(n,n) for n >= 0. (End)
From Andrey Zabolotskiy, Dec 19 2020: (Start)
a(n) = A074033(n) + A074034(n) + 2 * A074035(n).
a(n) = A074448(n) + A074449(n) + 2 * A074450(n).
a(n) = A074406(n) + A074407(n) + A074408(n) + A074409(n). (End)

Extensions

More terms from James Sellers, Apr 19 2000

A210109 Number of 3-divided binary sequences (or words) of length n.

Original entry on oeis.org

0, 0, 0, 2, 7, 23, 54, 132, 290, 634, 1342, 2834, 5868, 12140, 24899, 50929, 103735, 210901, 427623, 865910, 1750505, 3535098, 7131321, 14374647, 28952661, 58280123, 117248217, 235770302, 473897980, 952183214, 1912535827, 3840345963, 7709282937, 15472242645, 31045402788, 62280978042
Offset: 1

Views

Author

N. J. A. Sloane, Mar 17 2012

Keywords

Comments

A binary sequence (or word) W of length n is 3-divided if it can be written as a concatenation W = XYZ such that XYZ is strictly earlier in lexicographic order than any of the five permutations XZY, ZYX, YXZ, YZX, ZXY.
More generally, fix an alphabet A = {0,1,2,...,a-1}.
Define lexicographic order on words over A in the obvious way: for single letters, i < j is the natural order; for words U, V, we set U < V iff u_i < v_i at the first place where they differ; also U < UV if V is nonempty, etc.
Then a word U over A is "k-divided over A" if it can be written as U = X_1 X_2 ... X_k in such a way that X is strictly less in lexicographic order than X_pi_1 X_pi_2 ... X_pi_k for all nontrivial permutations pi of [1..k].
All 2^n binary words are 1-divided. For 2-divided words see A209970.
"k-divisible" would sound better to me than "k-divided", but I have followed Lothaire and Pirillo-Varricchio in using the latter term. Neither reference gives this sequence.

Examples

			The two 3-divisible binary words of length 4 and the seven of length 5 are as follows. The periods indicate the division w = x.y.z. For example, 0.01.1 is 3-divided since 0011 < all of 0101, 1010, 0101, 1001, 0110.
0.01.1
0.10.1
0.001.1
0.010.1
0.01.10
0.01.11
0.100.1
0.10.11
0.110.1
		

References

  • M. Lothaire, Combinatorics on words. A collective work by Dominique Perrin, Jean Berstel, Christian Choffrut, Robert Cori, Dominique Foata, Jean Eric Pin, Guiseppe Pirillo, Christophe Reutenauer, Marcel-P. Schützenberger, Jacques Sakarovitch and Imre Simon. With a foreword by Roger Lyndon. Edited and with a preface by Perrin. Encyclopedia of Mathematics and its Applications, 17. Addison-Wesley Publishing Co., Reading, Mass., 1983. xix+238 pp. ISBN: 0-201-13516-7, MR0675953 (84g:05002). See p. 144.

Crossrefs

Number of k-divided words of length n over alphabet of size A:
A=2, k=2,3,4,5: A209970 (and A209919, A000031, A001037), A210109 (and A210145), A210321, A210322;
A=3, k=2,3,4,5: A210323 (and A001867, A027376), A210324, A210325, A210326;
A=4, k=2,3,4: A210424 (and A001868, A027377), A210425, A210426.

Programs

  • Python
    # see link for faster, bit-based version
    from itertools import product
    def is3div(b):
        for i in range(1, len(b)-1):
            for j in range(i+1, len(b)):
                X, Y, Z = b[:i], b[i:j], b[j:]
                if all(b < bp for bp in [Z+Y+X, Z+X+Y, Y+Z+X, Y+X+Z, X+Z+Y]):
                    return True
        return False
    def a(n): return sum(is3div("".join(b)) for b in product("01", repeat=n))
    print([a(n) for n in range(1, 16)]) # Michael S. Branicky, Aug 27 2021

Formula

Is there a formula or recurrence?

Extensions

Values confirmed and a(30)-a(31) by David Applegate, Mar 19 2012
a(32)-a(36) from Michael S. Branicky, Aug 27 2021

A065419 Decimal expansion of Hardy-Littlewood constant Product_{p prime >= 5} (1-(6*p^2-4*p+1)/(p-1)^4).

Original entry on oeis.org

3, 0, 7, 4, 9, 4, 8, 7, 8, 7, 5, 8, 3, 2, 7, 0, 9, 3, 1, 2, 3, 3, 5, 4, 4, 8, 6, 0, 7, 1, 0, 7, 6, 8, 5, 3, 0, 2, 2, 1, 7, 8, 5, 1, 9, 9, 5, 0, 6, 6, 3, 9, 2, 8, 2, 9, 8, 3, 0, 8, 3, 9, 6, 2, 6, 0, 8, 8, 8, 7, 6, 7, 2, 9, 6, 6, 9, 2, 9, 9, 4, 8, 1, 3, 8, 4, 0, 2, 6, 4, 6, 8, 1, 7, 1, 4, 9, 3, 8
Offset: 0

Views

Author

N. J. A. Sloane, Nov 15 2001

Keywords

Comments

For comparison: Product_{n>=5} (1-(6n^2-4n+1)/(n-1)^4) = 3/32. - R. J. Mathar, Feb 25 2009

Examples

			0.30749487875832709312335448607107685302...
		

References

  • Steven R. Finch, Mathematical Constants, Encyclopedia of Mathematics and its Applications, vol. 94, Cambridge University Press, 2003, Section 2.1, p. 86.

Crossrefs

Programs

  • Mathematica
    $MaxExtraPrecision = 1000; digits = 99; terms = 1000; P[n_] := PrimeZetaP[ n] - 1/2^n - 1/3^n; LR = Join[{0, 0}, LinearRecurrence[{5, -4}, {-12, -60}, terms+10]]; r[n_Integer] := LR[[n]]; Exp[NSum[r[n]*P[n-1]/(n-1), {n, 3, terms}, NSumTerms -> terms, WorkingPrecision -> digits+10]] // RealDigits[#, 10, digits]& // First (* Jean-François Alcover, Apr 17 2016 *)
  • PARI
    prodeulerrat(1-(6*p^2-4*p+1)/(p-1)^4, 1, 5) \\ Amiram Eldar, Mar 10 2021

Extensions

A sign in the definition corrected by R. J. Mathar, Feb 25 2009

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

Views

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=4 of A143324.

Programs

  • Maple
    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;
  • Mathematica
    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 *)

Formula

a(n) = Sum_{d|n} mu(d)*4^(n/d).
a(n) = n * A027377(n), n>0.
G.f.: 1 + 4 * Sum_{k>=1} mu(k) * x^k / (1 - 4*x^k). - Ilya Gutkovskiy, Apr 14 2021

A124814 Triangle of number of 4-ary Lyndon words of length n containing exactly k 1s.

Original entry on oeis.org

1, 3, 1, 3, 3, 0, 8, 9, 3, 0, 18, 27, 12, 3, 0, 48, 81, 54, 18, 3, 0, 116, 243, 198, 89, 21, 3, 0, 312, 729, 729, 405, 135, 27, 3, 0, 810, 2187, 2538, 1701, 702, 189, 30, 3, 0, 2184, 6561, 8748, 6801, 3402, 1134, 251, 36, 3, 0, 5880, 19683, 29484, 26244, 15282, 6123, 1692
Offset: 0

Views

Author

Mike Zabrocki, Nov 08 2006

Keywords

Comments

Row sums given by A027377, first column given by A027376, second column given by A000244, third through sixth columns (k=2,3,4,5) given by A124810, A124811, A124812, A124813, third diagonal given by 3*A032766.

Examples

			T(4,2) = 12 because the words 11ab, 11ba, 1a1b for ab=23, 24, 34 and 11aa for a=2,3,4 are all Lyndon and of length 4 with exactly two 1s.
From _Andrew Howroyd_, Mar 26 2017: (Start)
Triangle starts
*   1
*   3    1
*   3    3    0
*   8    9    3    0
*  18   27   12    3   0
*  48   81   54   18   3   0
* 116  243  198   89  21   3  0
* 312  729  729  405 135  27  3 0
* 810 2187 2538 1701 702 189 30 3 0
(End)
		

Crossrefs

Programs

  • Maple
    C:=combinat[numbcomb]:mu:=numtheory[mobius]:divs:=numtheory[divisors]: T:=proc(n,k) local d; if k>0 then add(mu(d)*C(n/d-1,(n-k)/d)*3^((n-k)/d),d=divs(n) intersect divs(k))/k; elif n>0 then 1/n*add(mu(d)*3^(n/d),d=divs(n)); else 1; fi; end; [seq([seq(T(n,k),k=0..n)],n=0..10)];
  • Mathematica
    nmax = 10; col[0] = Table[If[n == 0, 1, 1/n* DivisorSum[n, MoebiusMu[#]* 3^(n/#)&]], {n, 0, nmax}]; col[k_] := x^k/k * DivisorSum[k, MoebiusMu[#] / (1 - 3*x^#)^(k/#)&] + O[x]^(nmax+2) // CoefficientList[#, x]&; Table[ col[k][[n+1]], {n, 0, nmax}, {k, 0, n}] // Flatten (* Jean-François Alcover, Sep 19 2017 *)

Formula

T(n,0) = 1/n*Sum_{d|n} mu(d)*3^(n/d) = A027376(n).
T(n,n-1) = 3 for k>0.
T(n,k) = 1/k*Sum_{d|k,d|n} mu(d) C(n/d-1,(n-k)/d )*3^((n-k)/d) = 1/(n-k)*Sum_{d|k,d|n} mu(d) C(n/d-1,k/d)*3^((n-k)/d).
O.g.f. of columns: Sum_n T(n,k) x^n = x^k/k*Sum_{d|k} mu(d)*1/(1-3*x^d)^(k/d).
O.g.f. of diagonals: Sum_n T(n,n-k) x^n = x^k/k*Sum_{d|k} mu(d)*(3/(1-x^d))^(k/d).
Showing 1-10 of 21 results. Next