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 26 results. Next

A006218 a(n) = Sum_{k=1..n} floor(n/k); also Sum_{k=1..n} d(k), where d = number of divisors (A000005); also number of solutions to x*y = z with 1 <= x,y,z <= n.

Original entry on oeis.org

0, 1, 3, 5, 8, 10, 14, 16, 20, 23, 27, 29, 35, 37, 41, 45, 50, 52, 58, 60, 66, 70, 74, 76, 84, 87, 91, 95, 101, 103, 111, 113, 119, 123, 127, 131, 140, 142, 146, 150, 158, 160, 168, 170, 176, 182, 186, 188, 198, 201, 207, 211, 217, 219, 227, 231, 239, 243, 247, 249
Offset: 0

Views

Author

Keywords

Comments

The identity Sum_{k=1..n} floor(n/k) = Sum_{k=1..n} d(k) is Equation (10), p. 58, of Apostol (1976). - N. J. A. Sloane, Dec 06 2020
The "Dirichlet divisor problem" is to find a precise asymptotic estimate for this sequence - see formula lines below, also Apostol (1976), Chap. 3.
Number of increasing arithmetic progressions where n+1 is the second or later term. - Mambetov Timur, Takenov Nurdin, Haritonova Oksana (timus(AT)post.kg; oksanka-61(AT)mail.ru), Jun 13 2002. E.g., a(3) = 5 because there are 5 such arithmetic progressions: (1, 2, 3, 4); (2, 3, 4); (1, 4); (2, 4); (3, 4).
Binomial transform of A001659.
Area covered by overlapped partitions of n, i.e., sum of maximum values of the k-th part of a partition of n into k parts. - Jon Perry, Sep 08 2005
Equals inverse Mobius transform of A116477. - Gary W. Adamson, Aug 07 2008
The Polymath project (see the Tao-Croot-Helfgott link) sketches an algorithm for computing a(n) in essentially cube root time, see section 2.1. - Charles R Greathouse IV, Oct 10 2010 [Sladkey gives another. - Charles R Greathouse IV, Oct 02 2017]
The Dirichlet inverse starts (offset 1) 1, -3, -5, 1, -10, 16, -16, 1, 2, 33, -29, -6, -37, 55, 55, -1, -52, -5, -60, ... - R. J. Mathar, Oct 17 2012
The inverse Mobius transforms yields A143356. - R. J. Mathar, Oct 17 2012
An improved approximation vs. Dirichlet is: a(n) = log(Gamma(n+1)) + 2n*gamma. Using sample ranges of {n = k^2-k to k^2 + (k-1)} the means of the new error term are < +- 0.5 up to k=150, except on two values of k. These ranges appear to give means closest to zero for such small sample sizes. It is not clear sample means remain < +- 0.5 at larger k. The standard deviations are ~(n*log(n))^(1/4)/2, with n near sample range center. - Richard R. Forberg, Jan 06 2015
The values of n for which a(n) is even are given by 4*m^2 <= n <= 4*m(m+1) for m >= 0. Example: for m=1 the values of n are 4 <= n <= 8 for which a(4) to a(8) are even. - G. C. Greubel, Sep 30 2015
For n > 0, a(n) = count(x|y), 1 <= y <= x <= n, that is, the number of pairs in the ordered list of x and y, where y divides x, up to and including n. - Torlach Rush, Jan 31 2017
a(n) is also the total number of partitions of all positive integers <= n into equal parts. - Omar E. Pol, May 29 2017
a(n) is the rank of the join of the set of elements of rank n in Young's lattice, the lattice of all integer partitions ordered by inclusion of their Ferrers diagrams. - Geoffrey Critzer, Jul 11 2018
a(n) always has the same parity as floor(sqrt(n)) = A000196(n): see A211264 (proof in Diophante link). - Bernard Schott, Feb 13 2021
From Omar E. Pol, Feb 16 2021: (Start)
Apart from initial zero this is the convolution of A341062 and A000027.
Nonzero terms convolved with A341062 gives A055507. (End)
From Bernard Schott, Apr 17 2022: (Start)
a(n-1) is the number of lattice points in the first quadrant lying under the hyperbola x*y = n, excluding the lattice points on the axes.
a(n) is the number of lattice points in the first quadrant lying on or under the hyperbola x*y = n, excluding the lattice points on the axes. (Reference Hari Kishan). (End)
Let tiles Tn (for n >= 1) be initially placed on square n on an infinite 1D board. At each step, the leftmost unblocked tile (i.e., the top tile in the leftmost stack) jumps forward exactly n squares. Tiles can stack, and only the top tile of a stack can move. This sequence gives the step number when tile n moves for the first time. - Ali Sada, May 23 2025

Examples

			a(3) = 5 because 3 + floor(3/2) + 1 = 3 + 1 + 1 = 5. Or tau(1) + tau(2) + tau(3) = 1 + 2 + 2 = 5.
a(4) = 8 because 4 + floor(4/2) + floor(4/3) + 1 = 4 + 2 + 1 + 1 = 8. Or
tau(1) + tau(2) + tau(3) + tau(4) = 1 + 2 + 2 + 3 = 8.
a(5) = 10 because 5 + floor(5/2) + floor(5/3) + floor (5/4) + 1 = 5 + 2 + 1 + 1 + 1 = 10. Or tau(1) + tau(2) + tau(3) + tau(4) + tau(5) = 1 + 2 + 2 + 3 + 2 = 10.
		

References

  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976.
  • K. Chandrasekharan, Introduction to Analytic Number Theory. Springer-Verlag, 1968, Chap. VI.
  • K. Chandrasekharan, Arithmetical Functions. Springer-Verlag, 1970, Chapter VIII, pp. 194-228. Springer-Verlag, Berlin.
  • P. G. L. Dirichlet, Werke, Vol. ii, pp. 49-66.
  • M. N. Huxley, The Distribution of Prime Numbers, Oxford Univ. Press, 1972, p. 7.
  • M. N. Huxley, Area, Lattice Points and Exponential Sums, Oxford, 1996; p. 239.
  • Hari Kishan, Number Theory, Krishna, Educational Publishers, 2014, Theorem 1, p. 133.
  • H. L. Montgomery, Ten Lectures on the Interface Between Analytic Number Theory and Harmonic Analysis, Amer. Math. Soc., 1996, p. 56.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • Nurdin N. Takenov and Oksana Haritonova, Representation of positive integers by a special set of digits and sequences, in Dolmatov, S. L. et al. editors, Materials of Science, Practical seminar "Modern Mathematics".
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, Exercise 3.6.13 on page 107.

Crossrefs

Right edge of A056535. Cf. A000005, A001659, A052511, A143236.
Row sums of triangle A003988, A010766 and A143724.
A061017 is an inverse.
It appears that the partial sums give A078567. - N. J. A. Sloane, Nov 24 2008

Programs

  • Haskell
    a006218 n = sum $ map (div n) [1..n]
    -- Reinhard Zumkeller, Jan 29 2011
    
  • Magma
    [0] cat [&+[Floor(n/k):k in [1..n]]:n in [1..60]]; // Marius A. Burtea, Aug 25 2019
    
  • Maple
    with(numtheory): A006218 := n->add(sigma[0](i), i=1..n);
  • Mathematica
    Table[Sum[DivisorSigma[0, k], {k, n}], {n, 70}]
    FoldList[Plus, 0, Table[DivisorSigma[0, x], {x, 61}]] //Rest (* much faster *)
    Join[{0},Accumulate[DivisorSigma[0,Range[60]]]] (* Harvey P. Dale, Jan 06 2016 *)
  • PARI
    a(n)=sum(k=1,n,n\k)
    
  • PARI
    a(n)=sum(k=1,sqrtint(n),n\k)*2-sqrtint(n)^2 \\ Charles R Greathouse IV, Oct 10 2010
    
  • Python
    from sympy import integer_nthroot
    def A006218(n): return 2*sum(n//k for k in range(1,integer_nthroot(n,2)[0]+1))-integer_nthroot(n,2)[0]**2 # Chai Wah Wu, Mar 29 2021

Formula

a(n) = n * ( log(n) + 2*gamma - 1 ) + O(sqrt(n)), where gamma is the Euler-Mascheroni number ~ 0.57721... (see A001620), Dirichlet, 1849. Again, a(n) = n * ( log(n) + 2*gamma - 1 ) + O(log(n)*n^(1/3)). The determination of the precise size of the error term is an unsolved problem (the so-called Dirichlet divisor problem) - see references, especially Huxley (2003).
The bounds from Chandrasekharan lead to the explicit bounds n log(n) + (2 gamma - 1) n - 4 sqrt(n) - 1 <= a(n) <= n log(n) + (2 gamma - 1) n + 4 sqrt(n). - David Applegate, Oct 14 2008
a(n) = 2*(Sum_{i=1..floor(sqrt(n))} floor(n/i)) - floor(sqrt(n))^2. - Benoit Cloitre, May 12 2002
G.f.: (1/(1-x))*Sum_{k >= 1} x^k/(1-x^k). - Benoit Cloitre, Apr 23 2003
For n > 0: A027750(a(n-1) + k) = k-divisor of n, = k <= A000005(n). - Reinhard Zumkeller, May 10 2006
a(n) = A161886(n) - n + 1 = A161886(n-1) - A049820(n) + 2 = A161886(n-1) + A000005(n) - n + 2 = A006590(n) + A000005(n) - n = A006590(n+1) - n - 1 = A006590(n) + A000005(n) - n for n >= 2. a(n) = a(n-1) + A000005(n) for n >= 1. - Jaroslav Krizek, Nov 14 2009
D(n) = Sum_{m >= 2, r >= 1} (r/m^(r+1)) * Sum_{j = 1..m - 1} * Sum_{k = 0 .. m^(r+1) - 1} exp{ 2*k*pi i(p^n + (m - j)m^r) / m^(r+1) } where p is some fixed prime number. - A. Neves, Oct 04 2010
Let E(n) = a(n) - n(log n + 2 gamma - 1). Then Berkane-Bordellès-Ramaré show that |E(n)| <= 0.961 sqrt(n), |E(n)| <= 0.397 sqrt(n) for n > 5559, and |E(n)| <= 0.764 n^(1/3) log n for x > 9994. - Charles R Greathouse IV, Jul 02 2012
a(n) = Sum_{k = 1..floor(sqrt(n))} A005408(floor((n/k) - (k-1))). - Gregory R. Bryant, Apr 20 2013
Dirichlet g.f. for s > 2: Sum_{n>=1} a(n)/n^s = Sum_{k>=1} (Zeta(s-1) - Sum_{n=1..k-1} (HurwitzZeta(s,n/k)*n/k^s))/k. - Mats Granvik, Sep 24 2017
From Ridouane Oudra, Dec 31 2022: (Start)
a(n) = n^2 - Sum_{i=1..n} Sum_{j=1..n} floor(log(i*j)/log(n+1));
a(n) = floor(sqrt(n)) + 2*Sum_{i=1..n} floor((sqrt(i^2 + 4*n) - i)/2);
a(n) = n + Sum_{i=1..n} v_2(i)*round(n/i), where v_2(i) = A007814(i). (End)

A210000 Number of unimodular 2 X 2 matrices having all terms in {0,1,...,n}.

Original entry on oeis.org

0, 6, 14, 30, 46, 78, 94, 142, 174, 222, 254, 334, 366, 462, 510, 574, 638, 766, 814, 958, 1022, 1118, 1198, 1374, 1438, 1598, 1694, 1838, 1934, 2158, 2222, 2462, 2590, 2750, 2878, 3070, 3166, 3454, 3598, 3790, 3918, 4238, 4334, 4670, 4830
Offset: 0

Views

Author

Clark Kimberling, Mar 16 2012

Keywords

Comments

a(n) is the number of 2 X 2 matrices having all terms in {0,1,...,n} and inverses with all terms integers.
Most sequences in the following guide count 2 X 2 matrices having all terms contained in the domain shown in column 2 and determinant d or permanent p or sum s of terms as indicated in column 3.
A059306 ... {0,1,...,n} ..... d=0
A171503 ... {0,1,...,n} ..... d=1
A210000 ... {0,1,...,n} .... |d|=1
A209973 ... {0,1,...,n} ..... d=2
A209975 ... {0,1,...,n} ..... d=3
A209976 ... {0,1,...,n} ..... d=4
A209977 ... {0,1,...,n} ..... d=5
A210282 ... {0,1,...,n} ..... d=n
A210283 ... {0,1,...,n} ..... d=n-1
A210284 ... {0,1,...,n} ..... d=n+1
A210285 ... {0,1,...,n} ..... d=floor(n/2)
A210286 ... {0,1,...,n} ..... d=trace
A280588 ... {0,1,...,n} ..... d=s
A106634 ... {0,1,...,n} ..... p=n
A210288 ... {0,1,...,n} ..... p=trace
A210289 ... {0,1,...,n} ..... p=(trace)^2
A280934 ... {0,1,...,n} ..... p=s
A210290 ... {0,1,...,n} ..... d>=0
A183761 ... {0,1,...,n} ..... d>0
A210291 ... {0,1,...,n} ..... d>n
A210366 ... {0,1,...,n} ..... d>=n
A210367 ... {0,1,...,n} ..... d>=2n
A210368 ... {0,1,...,n} ..... d>=3n
A210369 ... {0,1,...,n} ..... d is even
A210370 ... {0,1,...,n} ..... d is odd
A210371 ... {0,1,...,n} ..... d is even and >=0
A210372 ... {0,1,...,n} ..... d is even and >0
A210373 ... {0,1,...,n} ..... d is odd and >0
A210374 ... {0,1,...,n} ..... s=n+2
A210375 ... {0,1,...,n} ..... s=n+3
A210376 ... {0,1,...,n} ..... s=n+4
A210377 ... {0,1,...,n} ..... s=n+5
A210378 ... {0,1,...,n} ..... t is even
A210379 ... {0,1,...,n} ..... t is odd
A211031 ... {0,1,...,n} ..... d is in [-n,n]
A211032 ... {0,1,...,n} ..... d is in (-n,n)
A211033 ... {0,1,...,n} ..... d=0 (mod 3)
A211034 ... {0,1,...,n} ..... d=1 (mod 3)
A134506 ... {1,2,...,n} ..... d=0
A196227 ... {1,2,...,n} ..... d=1
A209979 ... {1,2,...,n} .... |d|=1
A197168 ... {1,2,...,n} ..... d=2
A210001 ... {1,2,...,n} ..... d=3
A210002 ... {1,2,...,n} ..... d=4
A210027 ... {1,2,...,n} ..... d=5
A211053 ... {1,2,...,n} ..... d=n
A211054 ... {1,2,...,n} ..... d=n-1
A211055 ... {1,2,...,n} ..... d=n+1
A055507 ... {1,2,...,n} ..... p=n
A211057 ... {1,2,...,n} ..... d is in [0,n]
A211058 ... {1,2,...,n} ..... d>=0
A211059 ... {1,2,...,n} ..... d>0
A211060 ... {1,2,...,n} ..... d>n
A211061 ... {1,2,...,n} ..... d>=n
A211062 ... {1,2,...,n} ..... d>=2n
A211063 ... {1,2,...,n} ..... d>=3n
A211064 ... {1,2,...,n} ..... d is even
A211065 ... {1,2,...,n} ..... d is odd
A211066 ... {1,2,...,n} ..... d is even and >=0
A211067 ... {1,2,...,n} ..... d is even and >0
A211068 ... {1,2,...,n} ..... d is odd and >0
A209981 ... {-n,....,n} ..... d=0
A209982 ... {-n,....,n} ..... d=1
A209984 ... {-n,....,n} ..... d=2
A209986 ... {-n,....,n} ..... d=3
A209988 ... {-n,....,n} ..... d=4
A209990 ... {-n,....,n} ..... d=5
A211140 ... {-n,....,n} ..... d=n
A211141 ... {-n,....,n} ..... d=n-1
A211142 ... {-n,....,n} ..... d=n+1
A211143 ... {-n,....,n} ..... d=n^2
A211140 ... {-n,....,n} ..... p=n
A211145 ... {-n,....,n} ..... p=trace
A211146 ... {-n,....,n} ..... d in [0,n]
A211147 ... {-n,....,n} ..... d>=0
A211148 ... {-n,....,n} ..... d>0
A211149 ... {-n,....,n} ..... d<0 or d>0
A211150 ... {-n,....,n} ..... d>n
A211151 ... {-n,....,n} ..... d>=n
A211152 ... {-n,....,n} ..... d>=2n
A211153 ... {-n,....,n} ..... d>=3n
A211154 ... {-n,....,n} ..... d is even
A211155 ... {-n,....,n} ..... d is odd
A211156 ... {-n,....,n} ..... d is even and >=0
A211157 ... {-n,....,n} ..... d is even and >0
A211158 ... {-n,....,n} ..... d is odd and >0

Examples

			a(2)=6 counts these matrices (using reduced matrix notation):
(1,0,0,1), determinant = 1, inverse = (1,0,0,1)
(1,0,1,1), determinant = 1, inverse = (1,0,-1,1)
(1,1,0,1), determinant = 1, inverse = (1,-1,0,1)
(0,1,1,0), determinant = -1, inverse = (0,1,1,0)
(0,1,1,1), determinant = -1, inverse = (-1,1,1,0)
(1,1,1,0), determinant = -1, inverse = (0,1,1,-1)
		

Crossrefs

Cf. A171503.
See also the very useful list of cross-references in the Comments section.

Programs

  • Mathematica
    a = 0; b = n; z1 = 50;
    t[n_] := t[n] = Flatten[Table[w*z - x*y, {w, a, b}, {x, a, b}, {y, a, b}, {z, a, b}]]
    c[n_, k_] := c[n, k] = Count[t[n], k]
    Table[c[n, 0], {n, 0, z1}]  (* A059306 *)
    Table[c[n, 1], {n, 0, z1}]  (* A171503 *)
    2 %                         (* A210000 *)
    Table[c[n, 2], {n, 0, z1}]  (* A209973 *)
    %/4                         (* A209974 *)
    Table[c[n, 3], {n, 0, z1}]  (* A209975 *)
    Table[c[n, 4], {n, 0, z1}]  (* A209976 *)
    Table[c[n, 5], {n, 0, z1}]  (* A209977 *)

Formula

a(n) = 2*A171503(n).

Extensions

A209982 added to list in comment by Chai Wah Wu, Nov 27 2016

A002133 Number of partitions of n with exactly two part sizes.

Original entry on oeis.org

0, 0, 1, 2, 5, 6, 11, 13, 17, 22, 27, 29, 37, 44, 44, 55, 59, 68, 71, 81, 82, 102, 97, 112, 109, 136, 126, 149, 141, 168, 157, 188, 176, 212, 182, 231, 207, 254, 230, 266, 241, 300, 259, 319, 283, 344, 295, 373, 311, 386, 352, 417, 353, 452, 368, 460, 418, 492, 413
Offset: 1

Views

Author

Keywords

Comments

Also number of solutions to the Diophantine equation ab + bc + cd = n, with a,b,c >= 1. - N. J. A. Sloane, Jun 17 2011
A generalized sum of divisors function.

Examples

			a(8) = 13 because we have 71, 62, 611, 53, 5111, 422, 41111, 332, 3311, 311111, 22211, 221111, 2111111.
		

References

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

Crossrefs

A diagonal of A060177.
Cf. A002134.

Programs

  • Maple
    g:=sum(sum(x^(i+j)/(1-x^i)/(1-x^j),j=1..i-1),i=1..80): gser:=series(g,x=0,65): seq(coeff(gser,x^n),n=1..60); # Emeric Deutsch, Mar 30 2006
    with(numtheory); D00:=n->add(tau(j)*tau(n-j),j=1..n-1); L3:=n->(D00(n)+tau(n)-sigma(n))/2; [seq(L3(n),n=1..60)]; # N. J. A. Sloane, Jun 17 2011
    A002133 := proc(n)
        A055507(n-1)+numtheory[tau](n)-numtheory[sigma](n) ;
        %/2 ;
    end proc: # R. J. Mathar, Jun 15 2022
    # Using function P from A365676:
    A002133 := n -> P(n, 2, n): seq(A002133(n), n = 1..59); # Peter Luschny, Sep 15 2023
  • Mathematica
    nn=50;ss=Sum[Sum[x^(i+j)/(1-x^i)/(1-x^j),{j,1,i-1}],{i,1,nn}];Drop[CoefficientList[Series[ss,{x,0,nn}],x],1]  (* Geoffrey Critzer, Sep 13 2012 *)
    Table[DivisorSigma[0, n] - DivisorSigma[1, n] + Sum[DivisorSigma[0, k]*DivisorSigma[0, n - k], {k, 1, n - 1}], {n, 1, 100}]/2 (* Vaclav Kotesovec, Aug 30 2025 *)
  • Python
    from sympy import divisor_count, divisor_sigma
    def A002133(n): return sum(divisor_count(j)*divisor_count(n-j) for j in range(1,(n-1>>1)+1)) + ((divisor_count(n+1>>1)**2 if n-1&1 else 0)+divisor_count(n)-divisor_sigma(n)>>1) # Chai Wah Wu, Sep 15 2023

Formula

G.f.: Sum_{i>=1} Sum_{j=1..i-1} x^(i+j)/((1-x^i)*(1-x^j)). - Emeric Deutsch, Mar 30 2006
Andrews gives a formula which is programmed up in the Maple code below. - N. J. A. Sloane, Jun 17 2011
G.f.: (G(x)^2-H(x))/2 where G(x) = Sum_{k>0} x^k/(1-x^k) and H(x) = Sum_{k>0} x^(2*k)/(1-x^k)^2. More generally, we obtain g.f. for number of partitions of n with m types of parts if we substitute x(i) with -Sum_{k>0}(x^n/(x^n-1))^i in cycle index Z(S(m); x(1),x(2),...,x(m)) of symmetric group S(m) of degree m. - Vladeta Jovovic, Sep 18 2007

A341062 Sequence whose partial sums give A000005.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Feb 04 2021

Keywords

Comments

Essentially a duplicate of A051950.
Convolved with A000041 gives A138137.
Convolved with A000027 gives the nonzero terms of A006218.
Convolved with A000070 gives the nonzero terms of A006128.
Convolved with A014153 gives the nonzero terms of A284870.
Convolved with A036469 gives the nonzero terms of A305082.
Convolved with the nonzero terms of A006218 gives A055507.
Convolved with the nonzero terms of A000217 gives the nonzero terms of A078567.

Crossrefs

Programs

  • Mathematica
    Join[{1}, Differences[Table[DivisorSigma[0, n], {n, 1, 90}]]] (* Amiram Eldar, Feb 06 2021 *)

Formula

a(n) = A051950(n) for n > 1.

A059819 Expansion of series related to Liouville's Last Theorem: g.f. Sum_{t>0} (-1)^(t+1) *x^(t*(t+1)/2) / ( (1-x^t)^2 *Product_{i=1..t} (1-x^i) ).

Original entry on oeis.org

0, 1, 3, 5, 9, 11, 18, 19, 28, 30, 40, 39, 57, 51, 68, 68, 86, 77, 107, 91, 123, 114, 138, 121, 172, 140, 178, 166, 205, 171, 240, 189, 251, 224, 266, 230, 322, 245, 314, 286, 356, 283, 396, 303, 403, 361, 416, 343, 497, 368, 479, 424, 515, 407
Offset: 0

Views

Author

N. J. A. Sloane, Feb 24 2001

Keywords

Crossrefs

Cf. A000005 (k=1), here (k=2), A059820 (k=3), ..., A059825 (k=8).

Programs

  • Maple
    Mk := proc(k) -1*add( (-1)^n*q^(n*(n+1)/2)/(1-q^n)^k/mul(1-q^i,i=1..n), n=1..101): end; # with k=2

Formula

a(n) = (sigma(n)+tau(n)+Sum_{k=0..n} tau(k)*tau(n-k))/2.
G.f.: (F(x)+G(x)^2)/2, where F(x) = Sum_{k>0} (k+1)*x^k/(1-x^k) and G(x) = Sum_{k>0} x^k/(1-x^k). - Vladeta Jovovic, Feb 12 2004

A059820 Expansion of series related to Liouville's Last Theorem: g.f. Sum_{t>0} (-1)^(t+1) *x^(t*(t+1)/2) / ( (1-x^t)^3 *Product_{i=1..t} (1-x^i) ).

Original entry on oeis.org

0, 1, 4, 9, 19, 30, 52, 70, 107, 136, 191, 226, 314, 352, 463, 523, 664, 717, 919, 964, 1205, 1282, 1546, 1603, 1992, 2009, 2414, 2504, 2958, 2974, 3606, 3553, 4223, 4273, 4936, 4912, 5885, 5685, 6634, 6654, 7664, 7454, 8822, 8454, 9845
Offset: 0

Views

Author

N. J. A. Sloane, Feb 24 2001

Keywords

Crossrefs

Cf. A000005 (k=1), A059819 (k=2), A059820 (k=3), A059821(k=4), A059822 (k=5), A059823 (k=6), A059824 (k=7), A059825 (k=8).
Cf. A000203, A001157, A055507, A191829 (Andrews's D_{0,0,0}(n)), A191831 (Andrews's D_{0,1}(n)).

Programs

  • Maple
    Mk := proc(k) -1*add( (-1)^n*q^(n*(n+1)/2)/(1-q^n)^k/mul(1-q^i,i=1..n), n=1..101): end; # with k=3
  • PARI
    D(x, y, n) = sum(k=1, n-1, sigma(k, x)*sigma(n-k, y));
    D000(n) = sum(k=1, n-1, sigma(k, 0)*D(0, 0, n-k));
    a(n) = if(n==0, 0, (3*D(0, 0, n)+3*D(0, 1, n)+D000(n)+2*sigma(n, 0)+3*sigma(n)+sigma(n, 2))/6); \\ Seiichi Manyama, Jul 26 2024

Formula

a(n) = ( 3*A055507(n-1) + 3*A191831(n) + A191829(n) + 2*sigma_0(n) + 3*sigma(n) + sigma_2(n) )/6. - Seiichi Manyama, Jul 26 2024

A065093 Convolution of A000010 with itself.

Original entry on oeis.org

1, 2, 5, 8, 16, 20, 36, 44, 68, 76, 120, 124, 188, 196, 276, 272, 404, 380, 544, 532, 716, 668, 968, 860, 1184, 1120, 1472, 1332, 1896, 1624, 2204, 2036, 2656, 2352, 3284, 2752, 3684, 3356, 4324, 3744, 5192, 4312, 5720, 5180, 6540, 5628, 7768, 6388, 8476
Offset: 1

Views

Author

Vladeta Jovovic, Nov 11 2001

Keywords

Crossrefs

Column k=2 of A340995.

Programs

  • Mathematica
    Table[Sum[EulerPhi[j]*EulerPhi[n-j], {j, 1, n-1}], {n, 2, 50}] (* Vaclav Kotesovec, Aug 18 2021 *)
  • PARI
    { for (n=1, 1000, a=sum(k=1, n, eulerphi(k)*eulerphi(n+1-k)); write("b065093.txt", n, " ", a) ) } \\ Harry J. Smith, Oct 06 2009

Formula

a(n) = Sum_{k=1..n} phi(k)*phi(n+1-k), where phi is Euler totient function (A000010).
G.f.: (1/x)*(Sum_{k>=1} mu(k)*x^k/(1 - x^k)^2)^2. - Ilya Gutkovskiy, Jan 31 2017
a(n) ~ (n^3/6) * c * Product_{primes p|n+1} ((p^3-2*p+1)/(p*(p^2-2))), where c = Product_{p prime} (1 - 2/p^2) = 0.322634... (A065474) (Ingham, 1927). - Amiram Eldar, Jul 13 2024

A191829 a(n) = Sum_{i+j+k=n, i,j,k >= 1} tau(i)*tau(j)*tau(k), where tau() = A000005().

Original entry on oeis.org

0, 0, 1, 6, 18, 41, 78, 132, 209, 306, 435, 591, 780, 1008, 1268, 1584, 1917, 2335, 2751, 3294, 3776, 4467, 5034, 5875, 6522, 7548, 8250, 9498, 10260, 11734, 12546, 14268, 15134, 17151, 18018, 20361, 21234, 23907, 24818, 27834, 28677, 32218, 32937, 36825, 37672, 41970, 42576, 47633, 48006, 53436, 54008, 59868, 60042, 67020, 66690
Offset: 1

Views

Author

N. J. A. Sloane, Jun 17 2011

Keywords

Comments

This is Andrews's D_{0,0,0}(n).

Crossrefs

Programs

  • Maple
    with(numtheory);
    D000:=proc(n) local t1,i,j;
    t1:=0;
    for i from 1 to n-1 do
    for j from 1 to n-1 do
    if (i+j < n) then t1 := t1+numtheory:-tau(i)*numtheory:-tau(j)*numtheory:-tau(n-i-j); fi;
    od; od;
    t1;
    end;
    [seq(D000(n),n=1..60)];
    # second Maple program:
    b:= proc(n, k) option remember; `if`(k=0, `if`(n=0, 1, 0),
          `if`(k=1, `if`(n=0, 0, numtheory[tau](n)), (q->
           add(b(j, q)*b(n-j, k-q), j=0..n))(iquo(k, 2))))
        end:
    a:= n-> b(n, 3):
    seq(a(n), n=1..55);  # Alois P. Heinz, Feb 01 2021
  • Mathematica
    nmax = 50; Rest[CoefficientList[Series[(-1/2 + (Log[1-x] + QPolyGamma[0, 1, 1/x])/Log[x])^3, {x, 0, nmax}], x]] (* Vaclav Kotesovec, Jan 01 2017 *)
  • Python
    from sympy import divisor_count
    def A191829(n): return sum(divisor_count(i)*sum(divisor_count(j)*divisor_count(n-i-j) for j in range(1,n-i)) for i in range(1,n-1)) # Chai Wah Wu, Jul 25 2024

Formula

G.f.: (Sum_{k>=1} x^k/(1 - x^k))^3. - Ilya Gutkovskiy, Jan 01 2017
a(n) = Sum_{k=1..n-1} Sum_{i=1..k-1} tau(i)*tau(n-k)*tau(k-i). - Ridouane Oudra, Oct 30 2023

A106634 Number of ways to express n as i*j+k*l, with i,j,k,l in the range [0..n].

Original entry on oeis.org

1, 6, 21, 32, 62, 58, 124, 88, 173, 158, 226, 156, 380, 194, 340, 356, 466, 274, 613, 316, 690, 536, 596, 404, 1060, 552, 734, 728, 1032, 546, 1376, 596, 1213, 932, 1026, 976, 1858, 750, 1180, 1144, 1910, 854, 2048, 908, 1784, 1730, 1500, 1016, 2800
Offset: 0

Views

Author

Ralf Stephan, May 06 2005

Keywords

Comments

Number of ordered 4-tuples [i,j,k,l] with n=i*j+k*l and i,j,k,l in the range [0..n].
a(n) is odd iff n is in A001105.

Examples

			a(1)=6: the 4-tuples ijkl are 1100, 1101, 1110, 0011, 0111, 1011.
a(2)=21: 1111, 2100, 210x, 21x0, 1200, 120x, 12x0, where x = 1 or 2, and ten more with the two halves swapped.
		

Crossrefs

Programs

  • Maple
    A106634 := proc(n)
        local a,i,j,k,l ;
        a := 0 ;
        for i from 0 to n do
            for j from 0 to n do
                if i*j > n then
                    break;
                end if;
                for k from 0 to n do
                    if i*j = n then
                        # treat l=0 separately
                        a := a+1 ;
                    end if;
                    # l=1..n
                    if k =0 then
                        if i*j=n then
                            a := a+n ;
                        end if;
                    else
                        l := (n-i*j)/k ;
                        if l >=1 and l <=n and type(l,'integer') then
                            a := a+1 ;
                        end if;
                    end if;
                end do:
            end do:
        end do:
        a ;
    end proc: # R. J. Mathar, Oct 17 2012
  • Mathematica
    list[n_] := Module[{v, i, j}, v[_] = 0;
    For[i = 2, i <= n, i++, For[j = 1, j <= Min[Quotient[n, i], i-1], j++, v[i*j]+= 2]];
    For[i = 1, i <= Floor@Sqrt[n], i++, v[i^2]++];
    Join[{1}, Table[2 Sum[v[j] v[i-j], {j, Quotient[i, 2]+1, i-1}]+If[OddQ[i], 0, v[i/2]^2]+(4i+2) v[i], {i, 1, n}]]];
    list[48] (* Jean-François Alcover, Jun 04 2023, after Charles R Greathouse IV *)
  • PARI
    list(n)={
        my(v=vector(n));
        for(i=2,n,for(j=1,min(n\i,i-1),v[i*j]+=2));
        for(i=1,sqrtint(n),v[i^2]++);
        concat(1,vector(n,i,2*sum(j=i\2+1,i-1,v[j]*v[i-j])+if(i%2,,v[i/2]^2)+(4*i+2)*v[i]))
    }; \\ Charles R Greathouse IV, Oct 17 2012

Formula

From Ridouane Oudra, Jul 20 2024: (Start)
a(n) = (4*n + 2)*tau(n) + Sum_{i=1..n-1} tau(i)*tau(n-i), for n>0 ;
a(n) = (4*n + 2)*A000005(n) + A055507(n-1), for n>0 ;
a(n) = 4*A038040(n) + A062011(n) + A055507(n-1), for n>0. (End)

Extensions

Definition clarified by N. J. A. Sloane, Jul 07 2012

A112963 Sum(mu(i)*tau(j): i+j=n), with mu=A008683 and tau=A000005.

Original entry on oeis.org

0, 1, 1, -1, -1, -4, -2, -5, -5, -4, -7, -4, -6, -7, -11, 0, -12, -1, -11, -6, -12, -1, -20, 2, -13, -2, -16, 2, -19, 9, -18, -9, -20, 4, -31, 10, -21, -2, -18, 7, -20, 14, -26, -3, -16, 13, -40, 5, -26, 7, -22, -1, -40, 18, -32, 2, -21, 10, -40, 16, -25, 5, -21, 17, -41, 31, -40, -4, -14, 30, -38, 3, -39, 8, -21, 14, -58
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 07 2005

Keywords

Examples

			a(5)=mu(1)*tau(4)+mu(2)*tau(3)+mu(3)*tau(2)+mu(4)*tau(1)
= 1*3 - 1*2 - 1*2 + 0*1 = -1.
		

Crossrefs

Programs

  • Haskell
    a112963 n = sum $ zipWith (*)
       a008683_list $ reverse $ take (n - 1) a000005_list
    -- Reinhard Zumkeller, Feb 29 2012
Showing 1-10 of 26 results. Next