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

A134542 A134541 * A000012.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 3, 3, 2, 1, 1, 2, 3, 3, 2, 1, 1, 3, 4, 4, 3, 2, 1, 1, 3, 4, 4, 4, 3, 2, 1, 1, 3, 4, 5, 5, 4, 3, 2, 1, 1, 2, 4, 5, 5, 5, 4, 3, 2, 1
Offset: 1

Views

Author

Gary W. Adamson, Oct 31 2007

Keywords

Comments

Row sums = A002088: (1, 2, 4, 6, 10, 12, 18, 22, ...).
A134542 * [1,2,3,...] = A015631: (1, 3, 8, 15, 29, 42, ...).

Examples

			First few rows of the triangle:
  1;
  1, 1;
  1, 2, 1;
  1, 2, 2, 1;
  1, 3, 3, 2, 1;
  1, 2, 3, 3, 2, 1;
  1, 3, 4, 4, 3, 2, 1;
  1, 3, 4, 4, 4, 3, 2, 1;
  1, 3, 4, 5, 5, 4, 3, 2, 1;
  1, 2, 4, 5, 5, 5, 4, 3, 2, 1;
  ...
		

Crossrefs

Formula

A134541 * A000012 as infinite lower triangular matrices.
Triangle read by rows, partial sums of A134541 terms starting from the right.

A002321 Mertens's function: Sum_{k=1..n} mu(k), where mu is the Moebius function A008683.

Original entry on oeis.org

1, 0, -1, -1, -2, -1, -2, -2, -2, -1, -2, -2, -3, -2, -1, -1, -2, -2, -3, -3, -2, -1, -2, -2, -2, -1, -1, -1, -2, -3, -4, -4, -3, -2, -1, -1, -2, -1, 0, 0, -1, -2, -3, -3, -3, -2, -3, -3, -3, -3, -2, -2, -3, -3, -2, -2, -1, 0, -1, -1, -2, -1, -1, -1, 0, -1, -2, -2, -1, -2, -3, -3, -4, -3, -3, -3, -2, -3, -4, -4, -4
Offset: 1

Views

Author

Keywords

Comments

Partial sums of the Moebius function A008683.
Also determinant of n X n (0,1) matrix defined by A(i,j)=1 if j=1 or i divides j.
The first positive value of Mertens's function for n > 1 is for n = 94. The graph seems to show a negative bias for the Mertens function which is eerily similar to the Chebyshev bias (described in A156749 and A156709). The purported bias seems to be empirically approximated to - (6 / Pi^2) * (sqrt(n) / 4) (by looking at the graph) (see MathOverflow link, May 28 2012) where 6 / Pi^2 = 1 / zeta(2) is the asymptotic density of squarefree numbers (the squareful numbers having Moebius mu of 0). This would be a growth pattern akin to the Chebyshev bias. - Daniel Forgues, Jan 23 2011
All integers appear infinitely often in this sequence. - Charles R Greathouse IV, Aug 06 2012
Soundararajan proves that, on the Riemann Hypothesis, a(n) << sqrt(n) exp(sqrt(log n)*(log log n)^14), sharpening the well-known equivalence. - Charles R Greathouse IV, Jul 17 2015
Balazard & De Roton improve this (on the Riemann Hypothesis) to a(n) << sqrt(n) exp(sqrt(log n)*(log log n)^k) for any k > 5/2, where the implied constant in the Vinogradov symbol depends on k. Saha & Sankaranarayanan reduce the exponent to 5/4 on additional hypotheses. - Charles R Greathouse IV, Feb 02 2023

Examples

			G.f. = x - x^3 - x^4 - 2*x^5 - x^6 - 2*x^7 - 2*x^8 - 2*x^9 - x^10 - 2*x^11 - 2*x^12 - ...
		

References

  • E. Landau, Vorlesungen über Zahlentheorie, Chelsea, NY, Vol. 2, p. 157.
  • D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, pp. 7-10.
  • F. Mertens, "Über eine zahlentheoretische Funktion", Akademie Wissenschaftlicher Wien Mathematik-Naturlich Kleine Sitzungsber, IIa 106, (1897), p. 761-830.
  • D. S. Mitrinovic et al., Handbook of Number Theory, Kluwer, Section VI.1.
  • Biswajyoti Saha and Ayyadurai Sankaranarayanan, On estimates of the Mertens function, International Journal of Number Theory, Vol. 15, No. 02 (2019), pp. 327-337.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • J. von zur Gathen and J. Gerhard, Modern Computer Algebra, Cambridge, 1999, see p. 482.

Crossrefs

First column of A134541.
First column of A179287.

Programs

  • Haskell
    import Data.List (genericIndex)
    a002321 n = genericIndex a002321_list (n-1)
    a002321_list = scanl1 (+) a008683_list
    -- Reinhard Zumkeller, Jul 14 2014, Dec 26 2012
    
  • Magma
    [&+[MoebiusMu(k): k in [1..n]]: n in [1..81]]; // Bruno Berselli, Jul 12 2021
  • Maple
    with(numtheory); A002321 := n->add(mobius(k),k=1..n);
  • Mathematica
    Rest[ FoldList[ #1+#2&, 0, Array[ MoebiusMu, 100 ] ] ]
    Accumulate[Array[MoebiusMu,100]] (* Harvey P. Dale, May 11 2011 *)
  • PARI
    a(n) = sum( k=1, n, moebius(k))
    
  • PARI
    a(n) = if( n<1, 0, matdet( matrix(n, n, i, j, j==1 || 0==j%i)))
    
  • PARI
    a(n)=my(s); forsquarefree(k=1,n, s+=moebius(k)); s \\ Charles R Greathouse IV, Jan 08 2018
    
  • Python
    from sympy import mobius
    def M(n): return sum(mobius(k) for k in range(1,n + 1))
    print([M(n) for n in range(1, 151)]) # Indranil Ghosh, Mar 18 2017
    
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A002321(n):
        if n == 0:
            return 0
        c, j = n, 2
        k1 = n//j
        while k1 > 1:
            j2 = n//k1 + 1
            c += (j2-j)*A002321(k1)
            j, k1 = j2, n//j2
        return j-c # Chai Wah Wu, Mar 30 2021
    

Formula

Assuming the Riemann hypothesis, a(n) = O(x^(1/2 + eps)) for every eps > 0 (Littlewood - see Landau p. 161).
Lambert series: Sum_{n >= 1} a(n)*(x^n/(1-x^n)-x^(n+1)/(1-x^(n+1))) = x and -1/x. - Mats Granvik, Sep 09 2010 and Sep 23 2010
a(n)+2 = A192763(n,1) for n>1, and A192763(1,k) for k>1 (conjecture). - Mats Granvik, Jul 10 2011
Sum_{k = 1..n} a(floor(n/k)) = 1. - David W. Wilson, Feb 27 2012
a(n) = Sum_{k = 1..n} tau_{-2}(k) * floor(n/k), where tau_{-2} is A007427. - Enrique Pérez Herrero, Jan 23 2013
a(n) = Sum_{k=1..A002088(n)} exp(2*Pi*i*A038566(k)/A038567(k-1)) where i is the imaginary unit. - Eric Desbiaux, Jul 31 2014
Schoenfeld proves that |a(n)| < 5.3*n/(log n)^(10/9) for n > 1. - Charles R Greathouse IV, Jan 17 2018
G.f. A(x) satisfies: A(x) = (1/(1 - x)) * (x - Sum_{k>=2} (1 - x^k) * A(x^k)). - Ilya Gutkovskiy, Aug 11 2021

A143327 Table T(n,k) by antidiagonals. T(n,k) is the number of primitive (=aperiodic) k-ary words (n,k >= 1) with length less than or equal to n which are earlier in lexicographic order than any other word derived by cyclic shifts of the alphabet.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 5, 1, 1, 4, 11, 11, 1, 1, 5, 19, 35, 26, 1, 1, 6, 29, 79, 115, 53, 1, 1, 7, 41, 149, 334, 347, 116, 1, 1, 8, 55, 251, 773, 1339, 1075, 236, 1, 1, 9, 71, 391, 1546, 3869, 5434, 3235, 488, 1, 1, 10, 89, 575, 2791, 9281, 19493, 21754, 9787, 983, 1, 1, 11
Offset: 1

Views

Author

Alois P. Heinz, Aug 07 2008

Keywords

Comments

The coefficients of the polynomial of row n are given by the n-th row of triangle A134541; for example row 4 has polynomial -1+k^2+k^3.

Examples

			T(3,3) = 11, because 11 words of length <=3 over 3-letter alphabet {a,b,c} are primitive and earlier than others derived by cyclic shifts of the alphabet: a, ab, ac, aab, aac, aba, abb, abc, aca, acb, acc.
Table begins:
  1,   1,    1,     1,     1,      1,      1,       1, ...
  1,   2,    3,     4,     5,      6,      7,       8, ...
  1,   5,   11,    19,    29,     41,     55,      71, ...
  1,  11,   35,    79,   149,    251,    391,     575, ...
  1,  26,  115,   334,   773,   1546,   2791,    4670, ...
  1,  53,  347,  1339,  3869,   9281,  19543,   37367, ...
  1, 116, 1075,  5434, 19493,  55936, 137191,  299510, ...
  1, 236, 3235, 21754, 97493, 335656, 960391, 2396150, ...
		

Crossrefs

Rows n=1-4 give: A000012, A000027, A028387, A003777.
Main diagonal gives A320095.

Programs

  • Maple
    with(numtheory):
    f1:= proc (n) option remember; unapply(k^(n-1)
            -add(f1(d)(k), d=divisors(n) minus {n}), k)
         end:
    g1:= proc(n) option remember; unapply(add(f1(j)(x), j=1..n), x) end:
    T:= (n, k)-> g1(n)(k):
    seq(seq(T(n, 1+d-n), n=1..d), d=1..12);
  • Mathematica
    t[n_, k_] := Sum[k^(d-1)*MoebiusMu[j/d], {j, 1, n}, {d, Divisors[j]}]; Table[t[n-k+1, k], {n, 1, 12}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Dec 13 2013 *)

Formula

T(n,k) = Sum_{j=1..n} Sum_{d|j} k^(d-1) * mu(j/d).
T(n,k) = Sum_{j=1..n} A143325(j,k).
T(n,k) = A143326(n,k) / k.

A143326 Table T(n,k) by antidiagonals. T(n,k) is the number of primitive (=aperiodic) k-ary words with length less than or equal to n (n,k >= 1).

Original entry on oeis.org

1, 2, 1, 3, 4, 1, 4, 9, 10, 1, 5, 16, 33, 22, 1, 6, 25, 76, 105, 52, 1, 7, 36, 145, 316, 345, 106, 1, 8, 49, 246, 745, 1336, 1041, 232, 1, 9, 64, 385, 1506, 3865, 5356, 3225, 472, 1, 10, 81, 568, 2737, 9276, 19345, 21736, 9705, 976, 1, 11, 100, 801, 4600, 19537, 55686
Offset: 1

Views

Author

Alois P. Heinz, Aug 07 2008

Keywords

Comments

The coefficients of the polynomial of row n are given by the n-th row of triangle A134541; for example row 4 has polynomial -k+k^3+k^4.

Examples

			T(2,3) = 9, because there are 9 primitive words of length less than or equal to 2 over 3-letter alphabet {a,b,c}: 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,       6,       7,        8, ...
  1,   4,    9,    16,     25,      36,      49,       64, ...
  1,  10,   33,    76,    145,     246,     385,      568, ...
  1,  22,  105,   316,    745,    1506,    2737,     4600, ...
  1,  52,  345,  1336,   3865,    9276,   19537,    37360, ...
  1, 106, 1041,  5356,  19345,   55686,  136801,   298936, ...
  1, 232, 3225, 21736,  97465,  335616,  960337,  2396080, ...
  1, 472, 9705, 87016, 487465, 2013936, 6722737, 19169200, ...
  ...
From _Wolfdieter Lang_, Feb 01 2014: (Start)
The triangle Tri(n,m) := T(m,n-(m-1)) begins:
n\m  1   2    3     4     5      6      7     8    9  10 ...
1:   1
2:   2   1
3:   3   4    1
4:   4   9   10     1
5:   5  16   33    22     1
6:   6  25   76   105    52      1
7:   7  36  145   316   345    106      1
8:   8  49  246   745  1336   1041    232     1
9:   9  64  385  1506  3865   5356   3225   472    1
10: 10  81  568  2737  9276  19345  21736  9705  976   1
...
For the columns see A000027, A000290, A081437, ... (End)
		

Crossrefs

Column 1: A000012. Rows 1-3: A000027, A000290, A081437 and A085490. See also A143324, A143327, A134541, A008683.

Programs

  • Maple
    with(numtheory):
    f0:= proc(n) option remember;
           unapply(k^n-add(f0(d)(k), d=divisors(n) minus {n}), k)
         end:
    g0:= proc(n) option remember; unapply(add(f0(j)(x), j=1..n), x) end:
    T:= (n, k)-> g0(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, Divisors[n] // Most}]]; g0[n_] := g0[n] = Function[x, Sum[f0[j][x], {j, 1, n}]]; T[n_, k_] := g0[n][k]; Table[T[n, 1+d-n], {d, 1, 12}, {n, 1, d}]//Flatten (* Jean-François Alcover, Feb 12 2014, translated from Maple *)

Formula

T(n,k) = Sum_{1<=j<=n} Sum_{d|j} k^d * mu(j/d).
T(n,k) = Sum_{1<=j<=n} A143324(j,k).
T(n,k) = A143327(n,k) * k.

A176702 Triangle T(n,k) read by rows. A051731(n,k)-A051731(n,k+1).

Original entry on oeis.org

1, 0, 1, 1, -1, 1, 0, 1, -1, 1, 1, 0, 0, -1, 1, 0, 0, 1, 0, -1, 1, 1, 0, 0, 0, 0, -1, 1, 0, 1, -1, 1, 0, 0, -1, 1, 1, -1, 1, 0, 0, 0, 0, -1, 1, 0, 1, 0, -1, 1, 0, 0, 0, -1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1, 0, 0, 0, 1, -1, 1, 0, 0, 0, 0, -1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1, 0, 1, 0, 0, 0, -1
Offset: 1

Views

Author

Mats Granvik, Gary W. Adamson, Apr 24 2010

Keywords

Comments

Matrix inverse of A134541.
The subsequence of A180430 beginning from the second column, divided by 2, equals this sequence. [From Mats Granvik, Sep 04 2010]

Examples

			Triangle begins:
1
0...1
1..-1...1
0...1..-1...1
1...0...0..-1...1
0...0...1...0..-1...1
1...0...0...0...0..-1...1
0...1..-1...1...0...0..-1...1
1..-1...1...0...0...0...0..-1...1
0...1...0..-1...1...0...0...0..-1...1
1...0...0...0...0...0...0...0...0..-1...1
0...0...0...1..-1...1...0...0...0...0..-1...1
		

Crossrefs

Cf. A176702*A000012=A051731. Row sums equals A000012.
Showing 1-5 of 5 results.