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

A274352 Convolution of A015723 and A000700.

Original entry on oeis.org

0, 1, 2, 4, 7, 10, 18, 26, 36, 53, 76, 104, 140, 190, 252, 336, 437, 564, 732, 936, 1186, 1504, 1894, 2366, 2950, 3659, 4520, 5564, 6822, 8330, 10152, 12326, 14906, 17996, 21662, 25996, 31135, 37190, 44314, 52704, 62532, 74036, 87504, 103212, 121496, 142798
Offset: 0

Views

Author

R. J. Mathar, Jun 18 2016

Keywords

Comments

Also the convolution of A080054 and A048272.

Crossrefs

Programs

  • Maple
    with(numtheory):
    b:= proc(n) option remember; `if`(n=0, 1, add(add(d*
         [0, 2, -1, 2][1+irem(d, 4)], d=divisors(j))*b(n-j), j=1..n)/n)
        end:
    g:= proc(n) option remember; add((-1)^(d+1), d=divisors(n)) end:
    a:= n-> add(b(j)*g(n-j), j=0..n):
    seq(a(n), n=0..60);  # Alois P. Heinz, Jun 18 2016
  • Mathematica
    q[n_, k_] := q[n, k] = If[n < k || k < 1, 0, If[n == 1, 1, q[n - k, k] + q[n - k, k - 1]]]; Table[Sum[SeriesCoefficient[Product[1 + x^j, {j, 1, k, 2}], {x, 0, k}] Sum[i q[#, i], {i, 1, Floor[(Sqrt[8 # + 1] - 1)/2]}] &[n - k], {k, 0, n}], {n, 0, 45}] (* Michael De Vlieger, Jun 18 2016, after Vaclav Kotesovec at A015723 and Vladimir Reshetnikov at A000700 *)

Formula

a(n) = Sum_{k=0..n} A015723(k)*A000700(n-k).
a(n) ~ log(2) * exp(Pi*sqrt(n/2)) / (Pi * 2^(3/4) * n^(1/4)). - Vaclav Kotesovec, Sep 14 2021

A000009 Expansion of Product_{m >= 1} (1 + x^m); number of partitions of n into distinct parts; number of partitions of n into odd parts.

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 4, 5, 6, 8, 10, 12, 15, 18, 22, 27, 32, 38, 46, 54, 64, 76, 89, 104, 122, 142, 165, 192, 222, 256, 296, 340, 390, 448, 512, 585, 668, 760, 864, 982, 1113, 1260, 1426, 1610, 1816, 2048, 2304, 2590, 2910, 3264, 3658, 4097, 4582, 5120, 5718, 6378
Offset: 0

Views

Author

Keywords

Comments

Partitions into distinct parts are sometimes called "strict partitions".
Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
The result that number of partitions of n into distinct parts = number of partitions of n into odd parts is due to Euler.
Bijection: given n = L1* 1 + L2*3 + L3*5 + L7*7 + ..., a partition into odd parts, write each Li in binary, Li = 2^a1 + 2^a2 + 2^a3 + ... where the aj's are all different, then expand n = (2^a1 * 1 + ...)*1 + ... by removing the brackets and we get a partition into distinct parts. For the reverse operation, just keep splitting any even number into halves until no evens remain.
Euler transform of period 2 sequence [1,0,1,0,...]. - Michael Somos, Dec 16 2002
Number of different partial sums 1+[1,2]+[1,3]+[1,4]+..., where [1,x] indicates a choice. E.g., a(6)=4, as we can write 1+1+1+1+1+1, 1+2+3, 1+2+1+1+1, 1+1+3+1. - Jon Perry, Dec 31 2003
a(n) is the sum of the number of partitions of x_j into at most j parts, where j is the index for the j-th triangular number and n-T(j)=x_j. For example; a(12)=partitions into <= 4 parts of 12-T(4)=2 + partitions into <= 3 parts of 12-T(3)=6 + partitions into <= 2 parts of 12-T(2)=9 + partitions into 1 part of 12-T(1)=11 = (2)(11) + (6)(51)(42)(411)(33)(321)(222) + (9)(81)(72)(63)(54)+(11) = 2+7+5+1 = 15. - Jon Perry, Jan 13 2004
Number of partitions of n where if k is the largest part, all parts 1..k are present. - Jon Perry, Sep 21 2005
Jack Grahl and Franklin T. Adams-Watters prove this claim of Jon Perry's by observing that the Ferrers dual of a "gapless" partition is guaranteed to have distinct parts; since the Ferrers dual is an involution, this establishes a bijection between the two sets of partitions. - Allan C. Wechsler, Sep 28 2021
The number of connected threshold graphs having n edges. - Michael D. Barrus (mbarrus2(AT)uiuc.edu), Jul 12 2007
Starting with offset 1 = row sums of triangle A146061 and the INVERT transform of A000700 starting: (1, 0, 1, -1, 1, -1, 1, -2, 2, -2, 2, -3, 3, -3, 4, -5, ...). - Gary W. Adamson, Oct 26 2008
Number of partitions of n in which the largest part occurs an odd number of times and all other parts occur an even number of times. (Such partitions are the duals of the partitions with odd parts.) - David Wasserman, Mar 04 2009
Equals A035363 convolved with A010054. The convolution square of A000009 = A022567 = A000041 convolved with A010054. A000041 = A000009 convolved with A035363. - Gary W. Adamson, Jun 11 2009
Considering all partitions of n into distinct parts: there are A140207(n) partitions of maximal size which is A003056(n), and A051162(n) is the greatest number occurring in these partitions. - Reinhard Zumkeller, Jun 13 2009
Equals left border of triangle A091602 starting with offset 1. - Gary W. Adamson, Mar 13 2010
Number of symmetric unimodal compositions of n+1 where the maximal part appears once. Also number of symmetric unimodal compositions of n where the maximal part appears an odd number of times. - Joerg Arndt, Jun 11 2013
Because for these partitions the exponents of the parts 1, 2, ... are either 0 or 1 (j^0 meaning that part j is absent) one could call these partitions also 'fermionic partitions'. The parts are the levels, that is the positive integers, and the occupation number is either 0 or 1 (like Pauli's exclusion principle). The 'fermionic states' are denoted by these partitions of n. - Wolfdieter Lang, May 14 2014
The set of partitions containing only odd parts forms a monoid under the product described in comments to A047993. - Richard Locke Peterson, Aug 16 2018
Ewell (1973) gives a number of recurrences. - N. J. A. Sloane, Jan 14 2020
a(n) equals the number of permutations p of the set {1,2,...,n+1}, written in one line notation as p = p_1p_2...p_(n+1), satisfying p_(i+1) - p_i <= 1 for 1 <= i <= n, (i.e., those permutations that, when read from left to right, never increase by more than 1) whose major index maj(p) := Sum_{p_i > p_(i+1)} i equals n. For example, of the 16 permutations on 5 letters satisfying p_(i+1) - p_i <= 1, 1 <= i <= 4, there are exactly two permutations whose major index is 4, namely, 5 3 4 1 2 and 2 3 4 5 1. Hence a(4) = 2. See the Bala link in A007318 for a proof. - Peter Bala, Mar 30 2022
Conjecture: Each positive integer n can be written as a_1 + ... + a_k, where a_1,...,a_k are strict partition numbers (i.e., terms of the current sequence) with no one dividing another. This has been verified for n = 1..1350. - Zhi-Wei Sun, Apr 14 2023
Conjecture: For each integer n > 7, a(n) divides none of p(n), p(n) - 1 and p(n) + 1, where p(n) is the number of partitions of n given by A000041. This has been verified for n up to 10^5. - Zhi-Wei Sun, May 20 2023 [Verified for n <= 2*10^6. - Vaclav Kotesovec, May 23 2023]
The g.f. Product_{k >= 0} 1 + x^k = Product_{k >= 0} 1 - x^k + 2*x^k == Product_{k >= 0} 1 - x^k == Sum_{k in Z} (-1)^k*x^(k*(3*k-1)/2) (mod 2) by Euler's pentagonal number theorem. It follows that a(n) is odd iff n = k*(3*k - 1)/2 for some integer k, i.e., iff n is a generalized pentagonal number A001318. - Peter Bala, Jan 07 2025

Examples

			G.f. = 1 + x + x^2 + 2*x^3 + 2*x^4 + 3*x^5 + 4*x^6 + 5*x^7 + 6*x^8 + 8*x^9 + ...
G.f. = q + q^25 + q^49 + 2*q^73 + 2*q^97 + 3*q^121 + 4*q^145 + 5*q^169 + ...
The partitions of n into distinct parts (see A118457) for small n are:
  1: 1
  2: 2
  3: 3, 21
  4: 4, 31
  5: 5, 41, 32
  6: 6, 51, 42, 321
  7: 7, 61, 52, 43, 421
  8: 8, 71, 62, 53, 521, 431
  ...
From _Reinhard Zumkeller_, Jun 13 2009: (Start)
a(8)=6, A140207(8)=#{5+2+1,4+3+1}=2, A003056(8)=3, A051162(8)=5;
a(9)=8, A140207(9)=#{6+2+1,5+3+1,4+3+2}=3, A003056(9)=3, A051162(9)=6;
a(10)=10, A140207(10)=#{4+3+2+1}=1, A003056(10)=4, A051162(10)=4. (End)
		

References

  • Mohammad K. Azarian, A Generalization of the Climbing Stairs Problem, Mathematics and Computer Education, Vol. 31, No. 1, pp. 24-28, Winter 1997. MathEduc Database (Zentralblatt MATH, 1997c.01891).
  • Mohammad K. Azarian, A Generalization of the Climbing Stairs Problem II, Missouri Journal of Mathematical Sciences, Vol. 16, No. 1, Winter 2004, pp. 12-17. Zentralblatt MATH, Zbl 1071.05501.
  • George E. Andrews, The Theory of Partitions, Cambridge University Press, 1998, p. 19.
  • George E. Andrews, Number Theory, Dover Publications, 1994, Theorem 12-3, pp. 154-5, and (13-1-1) p. 163.
  • Raymond Ayoub, An Introduction to the Analytic Theory of Numbers, Amer. Math. Soc., 1963; see p. 196.
  • T. J. I'a. Bromwich, Introduction to the Theory of Infinite Series, Macmillan, 2nd. ed. 1949, p. 116, Problem 18.
  • Louis Comtet, Advanced Combinatorics, Reidel, 1974, p. 99.
  • William Dunham, The Mathematical Universe, pp. 57-62, J. Wiley, 1994.
  • Leonhard Euler, De partitione numerorum, Novi commentarii academiae scientiarum Petropolitanae 3 (1750/1), 1753, reprinted in: Commentationes Arithmeticae. (Opera Omnia. Series Prima: Opera Mathematica, Volumen Secundum), 1915, Lipsiae et Berolini, 254-294.
  • Ian P. Goulden and David M. Jackson, Combinatorial Enumeration, Wiley, N.Y., 1983, (2.5.1).
  • G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, Cambridge, University Press, 1940, p. 86.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 277, Theorems 344, 346.
  • Carlos J. Moreno and Samuel S. Wagstaff, Jr., Sums of Squares of Integers, Chapman and Hall, 2006, p. 253.
  • Srinivasa Ramanujan, Collected Papers, Ed. G. H. Hardy et al., Cambridge 1927; Chelsea, NY, 1962. See Table V on page 309.
  • 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).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 288-290.

Crossrefs

Apart from the first term, equals A052839-1. The rows of A053632 converge to this sequence. When reduced modulo 2 equals the absolute values of A010815. The positions of odd terms given by A001318.
a(n) = Sum_{n=1..m} A097306(n, m), row sums of triangle of number of partitions of n into m odd parts.
Cf. A001318, A000041, A000700, A003724, A004111, A007837, A010815, A035294, A068049, A078408, A081360, A088670, A109950, A109968, A132312, A146061, A035363, A010054, A057077, A089806, A091602, A237515, A118457 (the partitions), A118459 (partition lengths), A015723 (total number of parts), A230957 (boustrophedon transform).
Cf. A167377 (complement).
Cf. A067659 (odd number of parts), A067661 (even number of parts).
Number of r-regular partitions for r = 2 through 12: A000009, A000726, A001935, A035959, A219601, A035985, A261775, A104502, A261776, A328545, A328546.

Programs

  • Haskell
    import Data.MemoCombinators (memo2, integral)
    a000009 n = a000009_list !! n
    a000009_list = map (pM 1) [0..] where
       pM = memo2 integral integral p
       p _ 0 = 1
       p k m | m < k     = 0
             | otherwise = pM (k + 1) (m - k) + pM (k + 1) m
    -- Reinhard Zumkeller, Sep 09 2015, Nov 05 2013
    
  • Julia
    # uses A010815
    using Memoize
    @memoize function A000009(n)
        n == 0 && return 1
        s = sum((-1)^k*A000009(n - k^2) for k in 1:isqrt(n))
        A010815(n) - 2*s
    end # Peter Luschny, Sep 09 2021
  • Magma
    Coefficients(&*[1+x^m:m in [1..100]])[1..100] where x is PolynomialRing(Integers()).1; // Sergei Haller (sergei(AT)sergei-haller.de), Dec 21 2006
    
  • Maple
    N := 100; t1 := series(mul(1+x^k,k=1..N),x,N); A000009 := proc(n) coeff(t1,x,n); end;
    spec := [ P, {P=PowerSet(N), N=Sequence(Z,card>=1)} ]: [ seq(combstruct[count](spec, size=n), n=0..58) ];
    spec := [ P, {P=PowerSet(N), N=Sequence(Z,card>=1)} ]: combstruct[allstructs](spec, size=10); # to get the actual partitions for n=10
    A000009 := proc(n)
        local x,m;
        product(1+x^m,m=1..n+1) ;
        expand(%) ;
        coeff(%,x,n) ;
    end proc: # R. J. Mathar, Jun 18 2016
    lim := 99; # Enlarge if more terms are needed.
    simplify(expand(QDifferenceEquations:-QPochhammer(-1, x, lim)/2, x)):
    seq(coeff(%, x, n), n=0..55); # Peter Luschny, Nov 17 2016
    # Alternative:
    a:= proc(n) option remember; `if`(n=0, 1, add(a(n-j)*add(
         `if`(d::odd, d, 0), d=numtheory[divisors](j)), j=1..n)/n)
        end:
    seq(a(n), n=0..55);  # Alois P. Heinz, Jun 24 2025
  • Mathematica
    PartitionsQ[Range[0, 60]] (* Harvey Dale, Jul 27 2009 *)
    a[ n_] := SeriesCoefficient[ Product[ 1 + x^k, {k, n}], {x, 0, n}]; (* Michael Somos, Jul 06 2011 *)
    a[ n_] := SeriesCoefficient[ 1 / Product[ 1 - x^k, {k, 1, n, 2}], {x, 0, n}]; (* Michael Somos, Jul 06 2011 *)
    a[ n_] := With[ {t = Log[q] / (2 Pi I)}, SeriesCoefficient[ q^(-1/24) DedekindEta[2 t] / DedekindEta[ t], {q, 0, n}]]; (* Michael Somos, Jul 06 2011 *)
    a[ n_] := SeriesCoefficient[ 1 / QPochhammer[ x, x^2], {x, 0, n}]; (* Michael Somos, May 24 2013 *)
    a[ n_] := SeriesCoefficient[ Series[ QHypergeometricPFQ[ {q}, {q x}, q, - q x], {q, 0, n}] /. x -> 1, {q, 0, n}]; (* Michael Somos, Mar 04 2014 *)
    a[ n_] := SeriesCoefficient[ QHypergeometricPFQ[{}, {}, q, -1] / 2, {q, 0, n}]; (* Michael Somos, Mar 04 2014 *)
    nmax = 60; CoefficientList[Series[Exp[Sum[(-1)^(k+1)/k*x^k/(1-x^k), {k, 1, nmax}]], {x, 0, nmax}], x] (* Vaclav Kotesovec, Aug 25 2015 *)
    nmax = 100; poly = ConstantArray[0, nmax + 1]; poly[[1]] = 1; poly[[2]] = 1; Do[Do[poly[[j + 1]] += poly[[j - k + 1]], {j, nmax, k, -1}];, {k, 2, nmax}]; poly (* Vaclav Kotesovec, Jan 14 2017 *)
  • Maxima
    num_distinct_partitions(60,list); /* Emanuele Munarini, Feb 24 2014 */
    
  • Maxima
    h(n):=if oddp(n)=true then 1 else 0;
    S(n,m):=if n=0 then 1 else if nVladimir Kruchinin, Sep 07 2014 */
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff( prod( k=1, n, 1 + x^k, 1 + x * O(x^n)), n))}; /* Michael Somos, Nov 17 1999 */
    
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x^2 + A) / eta(x + A), n))};
    
  • PARI
    {a(n) = my(c); forpart(p=n, if( n<1 || p[1]<2, c++; for(i=1, #p-1, if( p[i+1] > p[i]+1, c--; break)))); c}; /* Michael Somos, Aug 13 2017 */
    
  • PARI
    lista(nn) = {q='q+O('q^nn); Vec(eta(q^2)/eta(q))} \\ Altug Alkan, Mar 20 2018
    
  • Python
    # uses A010815
    from functools import lru_cache
    from math import isqrt
    @lru_cache(maxsize=None)
    def A000009(n): return 1 if n == 0 else A010815(n)+2*sum((-1)**(k+1)*A000009(n-k**2) for k in range(1,isqrt(n)+1)) # Chai Wah Wu, Sep 08 2021
    
  • Python
    import numpy as np
    n = 1000
    arr = np.zeros(n,dtype=object)
    arr[0] = 1
    for i in range(1,n):
        arr[i:] += arr[:n-i]
    print(arr) # Yigit Oktar, Jul 12 2025
    
  • SageMath
    # uses[EulerTransform from A166861]
    a = BinaryRecurrenceSequence(0, 1)
    b = EulerTransform(a)
    print([b(n) for n in range(56)]) # Peter Luschny, Nov 11 2020
    

Formula

G.f.: Product_{m>=1} (1 + x^m) = 1/Product_{m>=0} (1-x^(2m+1)) = Sum_{k>=0} Product_{i=1..k} x^i/(1-x^i) = Sum_{n>=0} x^(n*(n+1)/2) / Product_{k=1..n} (1-x^k).
G.f.: Sum_{n>=0} x^n*Product_{k=1..n-1} (1+x^k) = 1 + Sum_{n>=1} x^n*Product_{k>=n+1} (1+x^k). - Joerg Arndt, Jan 29 2011
Product_{k>=1} (1+x^(2k)) = Sum_{k>=0} x^(k*(k+1))/Product_{i=1..k} (1-x^(2i)) - Euler (Hardy and Wright, Theorem 346).
Asymptotics: a(n) ~ exp(Pi l_n / sqrt(3)) / ( 4 3^(1/4) l_n^(3/2) ) where l_n = (n-1/24)^(1/2) (Ayoub).
For n > 1, a(n) = (1/n)*Sum_{k=1..n} b(k)*a(n-k), with a(0)=1, b(n) = A000593(n) = sum of odd divisors of n; cf. A000700. - Vladeta Jovovic, Jan 21 2002
a(n) = t(n, 0), t as defined in A079211.
a(n) = Sum_{k=0..n-1} A117195(n,k) = A117192(n) + A117193(n) for n>0. - Reinhard Zumkeller, Mar 03 2006
a(n) = A026837(n) + A026838(n) = A118301(n) + A118302(n); a(A001318(n)) = A051044(n); a(A090864(n)) = A118303(n). - Reinhard Zumkeller, Apr 22 2006
Expansion of 1 / chi(-x) = chi(x) / chi(-x^2) = f(-x) / phi(x) = f(x) / phi(-x^2) = psi(x) / f(-x^2) = f(-x^2) / f(-x) = f(-x^4) / psi(-x) in powers of x where phi(), psi(), chi(), f() are Ramanujan theta functions. - Michael Somos, Mar 12 2011
G.f. is a period 1 Fourier series which satisfies f(-1 / (1152 t)) = 2^(-1/2) / f(t) where q = exp(2 Pi i t). - Michael Somos, Aug 16 2007
Expansion of q^(-1/24) * eta(q^2) / eta(q) in powers of q.
Expansion of q^(-1/24) 2^(-1/2) f2(t) in powers of q = exp(2 Pi i t) where f2() is a Weber function. - Michael Somos, Oct 18 2007
Given g.f. A(x), then B(x) = x * A(x^3)^8 satisfies 0 = f(B(x), B(x^2)) where f(u, v) = v - u^2 + 16*u*v^2 . - Michael Somos, May 31 2005
Given g.f. A(x), then B(x) = x * A(x^8)^3 satisfies 0 = f(B(x), B(x^3)) where f(u, v) = (u^3 - v) * (u + v^3) - 9 * u^3 * v^3. - Michael Somos, Mar 25 2008
From Evangelos Georgiadis, Andrew V. Sutherland, Kiran S. Kedlaya (egeorg(AT)mit.edu), Mar 03 2009: (Start)
a(0)=1; a(n) = 2*(Sum_{k=1..floor(sqrt(n))} (-1)^(k+1) a(n-k^2)) + sigma(n) where sigma(n) = (-1)^j if (n=(j*(3*j+1))/2 OR n=(j*(3*j-1))/2) otherwise sigma(n)=0 (simpler: sigma = A010815). (End)
From Gary W. Adamson, Jun 13 2009: (Start)
The product g.f. = (1/(1-x))*(1/(1-x^3))*(1/(1-x^5))*...; = (1,1,1,...)*
(1,0,0,1,0,0,1,0,0,1,...)*(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,...) * ...; =
a*b*c*... where a, a*b, a*b*c, ... converge to A000009:
1, 1, 1, 2, 2, 2, 3, 3, 3, 4, ... = a*b
1, 1, 1, 2, 2, 3, 4, 4, 5, 6, ... = a*b*c
1, 1, 1, 2, 2, 3, 4, 5, 6, 7, ... = a*b*c*d
1, 1, 1, 2, 2, 3, 4, 5, 6, 8, ... = a*b*c*d*e
1, 1, 1, 2, 2, 3, 4, 5, 6, 8, ... = a*b*c*d*e*f
... (cf. analogous example in A000041). (End)
a(A004526(n)) = A172033(n). - Reinhard Zumkeller, Jan 23 2010
a(n) = P(n) - P(n-2) - P(n-4) + P(n-10) + P(n-14) + ... + (-1)^m P(n-2p_m) + ..., where P(n) is the partition function (A000041) and p_m = m(3m-1)/2 is the m-th generalized pentagonal number (A001318). - Jerome Malenfant, Feb 16 2011
a(n) = A054242(n,0) = A201377(n,0). - Reinhard Zumkeller, Dec 02 2011
More precise asymptotics: a(n) ~ exp(Pi*sqrt((n-1/24)/3)) / (4*3^(1/4)*(n-1/24)^(3/4)) * (1 + (Pi^2-27)/(24*Pi*sqrt(3*(n-1/24))) + (Pi^4-270*Pi^2-1215)/(3456*Pi^2*(n-1/24))). - Vaclav Kotesovec, Nov 30 2015
a(n) = A067661(n) + A067659(n). Wolfdieter Lang, Jan 18 2016
From Vaclav Kotesovec, May 29 2016: (Start)
a(n) ~ exp(Pi*sqrt(n/3))/(4*3^(1/4)*n^(3/4)) * (1 + (Pi/(48*sqrt(3)) - (3*sqrt(3))/(8*Pi))/sqrt(n) + (Pi^2/13824 - 5/128 - 45/(128*Pi^2))/n).
a(n) ~ exp(Pi*sqrt(n/3) + (Pi/(48*sqrt(3)) - 3*sqrt(3)/(8*Pi))/sqrt(n) - (1/32 + 9/(16*Pi^2))/n) / (4*3^(1/4)*n^(3/4)).
(End)
a(n) = A089806(n)*A010815(floor(n/2)) + a(n-1) + a(n-2) - a(n-5) - a(n-7) + a(n-12) + ... + A057077(m-1)*a(n-A001318(m)) + ..., where n > A001318(m). - Gevorg Hmayakyan, Jul 07 2016
a(n) ~ Pi*BesselI(1, Pi*sqrt((n+1/24)/3)) / sqrt(24*n+1). - Vaclav Kotesovec, Nov 08 2016
a(n) = A000041(n) - A047967(n). - R. J. Mathar, Nov 20 2017
Sum_{n>=1} 1/a(n) = A237515. - Amiram Eldar, Nov 15 2020
From Peter Bala, Jan 15 2021: (Start)
G.f.: (1 + x)*Sum_{n >= 0} x^(n*(n+3)/2)/Product_{k = 1..n} (1 - x^k) =
(1 + x)*(1 + x^2)*Sum_{n >= 0} x^(n*(n+5)/2)/Product_{k = 1..n} (1 - x^k) = (1 + x)*(1 + x^2)*(1 + x^3)*Sum_{n >= 0} x^(n*(n+7)/2)/Product_{k = 1..n} (1 - x^k) = ....
G.f.: (1/2)*Sum_{n >= 0} x^(n*(n-1)/2)/Product_{k = 1..n} (1 - x^k) =
(1/2)*(1/(1 + x))*Sum_{n >= 0} x^((n-1)*(n-2)/2)/Product_{k = 1..n} (1 - x^k) = (1/2)*(1/((1 + x)*(1 + x^2)))*Sum_{n >= 0} x^((n-2)*(n-3)/2)/Product_{k = 1..n} (1 - x^k) = ....
G.f.: Sum_{n >= 0} x^n/Product_{k = 1..n} (1 - x^(2*k)) = (1/(1 - x)) * Sum_{n >= 0} x^(3*n)/Product_{k = 1..n} (1 - x^(2*k)) = (1/((1 - x)*(1 - x^3))) * Sum_{n >= 0} x^(5*n)/Product_{k = 1..n} (1 - x^(2*k)) = (1/((1 - x)*(1 - x^3)*(1 - x^5))) * Sum_{n >= 0} x^(7*n)/Product_{k = 1..n} (1 - x^(2*k)) = .... (End)
From Peter Bala, Feb 02 2021: (Start)
G.f.: A(x) = Sum_{n >= 0} x^(n*(2*n-1))/Product_{k = 1..2*n} (1 - x^k). (Set z = x and q = x^2 in Mc Laughlin et al. (2019 ArXiv version), Section 1.3, Identity 7.)
Similarly, A(x) = Sum_{n >= 0} x^(n*(2*n+1))/Product_{k = 1..2*n+1} (1 - x^k). (End)
a(n) = A001227(n) + A238005(n) + A238006(n). - R. J. Mathar, Sep 08 2021
G.f.: A(x) = exp ( Sum_{n >= 1} x^n/(n*(1 - x^(2*n))) ) = exp ( Sum_{n >= 1} (-1)^(n+1)*x^n/(n*(1 - x^n)) ). - Peter Bala, Dec 23 2021
Sum_{n>=0} a(n)/exp(Pi*n) = exp(Pi/24)/2^(1/8) = A292820. - Simon Plouffe, May 12 2023 [Proof: Sum_{n>=0} a(n)/exp(Pi*n) = phi(exp(-2*Pi)) / phi(exp(-Pi)), where phi(q) is the Euler modular function. We have phi(exp(-2*Pi)) = exp(Pi/12) * Gamma(1/4) / (2 * Pi^(3/4)) and phi(exp(-Pi)) = exp(Pi/24) * Gamma(1/4) / (2^(7/8) * Pi^(3/4)), see formulas (14) and (13) in I. Mező, 2013. - Vaclav Kotesovec, May 12 2023]
a(2*n) = Sum_{j=1..n} p(n+j, 2*j) and a(2*n+1) = Sum_{j=1..n+1} p(n+j,2*j-1), where p(n, s) is the number of partitions of n having exactly s parts. - Gregory L. Simay, Aug 30 2023

A006128 Total number of parts in all partitions of n. Also, sum of largest parts of all partitions of n.

Original entry on oeis.org

0, 1, 3, 6, 12, 20, 35, 54, 86, 128, 192, 275, 399, 556, 780, 1068, 1463, 1965, 2644, 3498, 4630, 6052, 7899, 10206, 13174, 16851, 21522, 27294, 34545, 43453, 54563, 68135, 84927, 105366, 130462, 160876, 198014, 242812, 297201, 362587, 441546, 536104, 649791, 785437, 947812, 1140945, 1371173, 1644136, 1968379, 2351597, 2805218, 3339869, 3970648, 4712040, 5584141, 6606438, 7805507, 9207637
Offset: 0

Views

Author

Keywords

Comments

a(n) = degree of Kac determinant at level n as polynomial in the conformal weight (called h). (Cf. C. Itzykson and J.-M. Drouffe, Statistical Field Theory, Vol. 2, p. 533, eq.(98); reference p. 643, Cambridge University Press, (1989).) - Wolfdieter Lang
Also the number of one-element transitions from the integer partitions of n to the partitions of n-1 for labeled parts with the assumption that from any part z > 1 one can take an element of amount 1 in one way only. That means z is composed of z unlabeled parts of amount 1, i.e. z = 1 + 1 + ... + 1. E.g., for n=3 to n=2 we have a(3) = 6 and [111] --> [11], [111] --> [11], [111] --> [11], [12] --> [11], [12] --> [2], [3] --> [2]. For the case of z composed by labeled elements, z = 1_1 + 1_2 + ... + 1_z, see A066186. - Thomas Wieder, May 20 2004
Number of times a derivative of any order (not 0 of course) appears when expanding the n-th derivative of 1/f(x). For instance (1/f(x))'' = (2 f'(x)^2-f(x) f''(x)) / f(x)^3 which makes a(2) = 3 (by counting k times the k-th power of a derivative). - Thomas Baruchel, Nov 07 2005
Starting with offset 1, = the partition triangle A008284 * [1, 2, 3, ...]. - Gary W. Adamson, Feb 13 2008
Starting with offset 1 equals A000041: (1, 1, 2, 3, 5, 7, 11, ...) convolved with A000005: (1, 2, 2, 3, 2, 4, ...). - Gary W. Adamson, Jun 16 2009
Apart from initial 0 row sums of triangle A066633, also the Möbius transform is A085410. - Gary W. Adamson, Mar 21 2011
More generally, the total number of parts >= k in all partitions of n equals the sum of k-th largest parts of all partitions of n. In this case k = 1. Apart from initial 0 the first column of A181187. - Omar E. Pol, Feb 14 2012
Row sums of triangle A221530. - Omar E. Pol, Jan 21 2013
From Omar E. Pol, Feb 04 2021: (Start)
a(n) is also the total number of divisors of all positive integers in a sequence with n blocks where the m-th block consists of A000041(n-m) copies of m, with 1 <= m <= n. The mentioned divisors are also all parts of all partitions of n.
Apart from initial zero this is also as follows:
Convolution of A000005 and A000041.
Convolution of A006218 and A002865.
Convolution of A341062 and A000070.
Row sums of triangles A221531, A245095, A339258, A340525, A340529. (End)
Number of ways to choose a part index of an integer partition of n, i.e., partitions of n with a selected position. Selecting a part value instead of index gives A000070. - Gus Wiseman, Apr 19 2021

Examples

			For n = 4 the partitions of 4 are [4], [2, 2], [3, 1], [2, 1, 1], [1, 1, 1, 1]. The total number of parts is 12. On the other hand, the sum of the largest parts of all partitions is 4 + 2 + 3 + 2 + 1 = 12, equaling the total number of parts, so a(4) = 12. - _Omar E. Pol_, Oct 12 2018
		

References

  • S. M. Luthra, On the average number of summands in partitions of n, Proc. Nat. Inst. Sci. India Part. A, 23 (1957), p. 483-498.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Main diagonal of A210485.
Column k=1 of A256193.
The version for normal multisets is A001787.
The unordered version is A001792.
The strict case is A015723.
The version for factorizations is A066637.
A000041 counts partitions.
A000070 counts partitions with a selected part.
A336875 counts compositions with a selected part.
A339564 counts factorizations with a selected factor.

Programs

  • GAP
    List([0..60],n->Length(Flat(Partitions(n)))); # Muniru A Asiru, Oct 12 2018
  • Haskell
    a006128 = length . concat . ps 1 where
       ps _ 0 = [[]]
       ps i j = [t:ts | t <- [i..j], ts <- ps t (j - t)]
    -- Reinhard Zumkeller, Jul 13 2013
    
  • Maple
    g:= add(n*x^n*mul(1/(1-x^k), k=1..n), n=1..61):
    a:= n-> coeff(series(g,x,62),x,n):
    seq(a(n), n=0..61);
    # second Maple program:
    a:= n-> add(combinat[numbpart](n-j)*numtheory[tau](j), j=1..n):
    seq(a(n), n=0..61);  # Alois P. Heinz, Aug 23 2019
  • Mathematica
    a[n_] := Sum[DivisorSigma[0, m] PartitionsP[n - m], {m, 1, n}]; Table[ a[n], {n, 0, 41}]
    CoefficientList[ Series[ Sum[n*x^n*Product[1/(1 - x^k), {k, n}], {n, 100}], {x, 0, 100}], x]
    a[n_] := Plus @@ Max /@ IntegerPartitions@ n; Array[a, 45] (* Robert G. Wilson v, Apr 12 2011 *)
    Join[{0}, ((Log[1 - x] + QPolyGamma[1, x])/(Log[x] QPochhammer[x]) + O[x]^60)[[3]]] (* Vladimir Reshetnikov, Nov 17 2016 *)
    Length /@ Table[IntegerPartitions[n] // Flatten, {n, 50}] (* Shouvik Datta, Sep 12 2021 *)
  • PARI
    f(n)= {local(v,i,k,s,t);v=vector(n,k,0);v[n]=2;t=0;while(v[1]1,i--;s+=i*(v[i]=(n-s)\i));t+=sum(k=1,n,v[k]));t } /* Thomas Baruchel, Nov 07 2005 */
    
  • PARI
    a(n) = sum(m=1, n, numdiv(m)*numbpart(n-m)) \\ Michel Marcus, Jul 13 2013
    
  • Python
    from sympy import divisor_count, npartitions
    def a(n): return sum([divisor_count(m)*npartitions(n - m) for m in range(1, n + 1)]) # Indranil Ghosh, Apr 25 2017
    

Formula

G.f.: Sum_{n>=1} n*x^n / Product_{k=1..n} (1-x^k).
G.f.: Sum_{k>=1} x^k/(1-x^k) / Product_{m>=1} (1-x^m).
a(n) = Sum_{k=1..n} k*A008284(n, k).
a(n) = Sum_{m=1..n} of the number of divisors of m * number of partitions of n-m.
Note that the formula for the above comment is a(n) = Sum_{m=1..n} d(m)*p(n-m) = Sum_{m=1..n} A000005(m)*A000041(n-m), if n >= 1. - Omar E. Pol, Jan 21 2013
Erdős and Lehner show that if u(n) denotes the average largest part in a partition of n, then u(n) ~ constant*sqrt(n)*log n.
a(n) = A066897(n) + A066898(n), n>0. - Reinhard Zumkeller, Mar 09 2012
a(n) = A066186(n) - A196087(n), n >= 1. - Omar E. Pol, Apr 22 2012
a(n) = A194452(n) + A024786(n+1). - Omar E. Pol, May 19 2012
a(n) = A000203(n) + A220477(n). - Omar E. Pol, Jan 17 2013
a(n) = Sum_{m=1..p(n)} A194446(m) = Sum_{m=1..p(n)} A141285(m), where p(n) = A000041(n), n >= 1. - Omar E. Pol, May 12 2013
a(n) = A198381(n) + A026905(n), n >= 1. - Omar E. Pol, Aug 10 2013
a(n) = O(sqrt(n)*log(n)*p(n)), where p(n) is the partition function A000041(n). - Peter Bala, Dec 23 2013
a(n) = Sum_{m=1..n} A006218(m)*A002865(n-m), n >= 1. - Omar E. Pol, Jul 14 2014
From Vaclav Kotesovec, Jun 23 2015: (Start)
Asymptotics (Luthra, 1957): a(n) = p(n) * (C*N^(1/2) + C^2/2) * (log(C*N^(1/2)) + gamma) + (1+C^2)/4 + O(N^(-1/2)*log(N)), where N = n - 1/24, C = sqrt(6)/Pi, gamma is the Euler-Mascheroni constant A001620 and p(n) is the partition function A000041(n).
The formula a(n) = p(n) * (sqrt(3*n/(2*Pi)) * (log(n) + 2*gamma - log(Pi/6)) + O(log(n)^3)) in the abstract of the article by Kessler and Livingston (cited also in the book by Sandor, p. 495) is incorrect!
Right is: a(n) = p(n) * (sqrt(3*n/2)/Pi * (log(n) + 2*gamma - log(Pi^2/6)) + O(log(n)^3))
or a(n) ~ exp(Pi*sqrt(2*n/3)) * (log(6*n/Pi^2) + 2*gamma) / (4*Pi*sqrt(2*n)).
(End)
a(n) = Sum_{m=1..n} A341062(m)*A000070(n-m), n >= 1. - Omar E. Pol, Feb 05 2021 2014

A008289 Triangle read by rows: Q(n,m) = number of partitions of n into m distinct parts, n>=1, m>=1.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 3, 1, 1, 3, 2, 1, 4, 3, 1, 4, 4, 1, 1, 5, 5, 1, 1, 5, 7, 2, 1, 6, 8, 3, 1, 6, 10, 5, 1, 7, 12, 6, 1, 1, 7, 14, 9, 1, 1, 8, 16, 11, 2, 1, 8, 19, 15, 3, 1, 9, 21, 18, 5, 1, 9, 24, 23, 7, 1, 10, 27, 27, 10, 1, 1, 10, 30, 34, 13, 1, 1, 11, 33, 39, 18, 2, 1, 11, 37
Offset: 1

Views

Author

Keywords

Comments

Row n contains A003056(n) = floor((sqrt(8*n+1)-1)/2) terms (number of terms increases by one at each triangular number). - Michael Somos, Dec 04 2002
Row sums give A000009.
Q(n,m) is the number of partitions of n whose greatest part is m and every number in {1,2,...,m} occurs as a part at least once. - Geoffrey Critzer, Nov 17 2011

Examples

			Q(8,3) = 2 since 8 can be written in 2 ways as sum of 3 distinct positive integers: 5+2+1 and 4+3+1.
Triangle starts:
  1;
  1;
  1,  1;
  1,  1;
  1,  2;
  1,  2,  1;
  1,  3,  1;
  1,  3,  2;
  1,  4,  3;
  1,  4,  4,  1;
  1,  5,  5,  1;
  1,  5,  7,  2;
  1,  6,  8,  3;
  1,  6, 10,  5;
  1,  7, 12,  6,  1;
  1,  7, 14,  9,  1;
  1,  8, 16, 11,  2;
  1,  8, 19, 15,  3;
  1,  9, 21, 18,  5;
  1,  9, 24, 23,  7;
  1, 10, 27, 27, 10,  1;
  1, 10, 30, 34, 13,  1;
  1, 11, 33, 39, 18,  2;
  1, 11, 37, 47, 23,  3;
  1, 12, 40, 54, 30,  5;
  1, 12, 44, 64, 37,  7;
  1, 13, 48, 72, 47, 11;
  1, 13, 52, 84, 57, 14, 1;
  1, 14, 56, 94, 70, 20, 1; ...
Q(8,3) = 2 because there are 2 partitions of 8 in which  1, 2 and 3 occur as a part at least once: (3,2,2,1), (3,2,1,1,1). - _Geoffrey Critzer_, Nov 17 2011
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 115.

Crossrefs

Sum of n-th row is A000009(n). Sum(Q(n,k)*k, k>=1) = A015723(n).
A060016 is another version.
Cf. A032020.

Programs

  • Maple
    g:=product(1+t*x^j,j=1..40): gser:=simplify(series(g,x=0,32)): P[0]:=1: for n from 1 to 30 do P[n]:=sort(coeff(gser,x^n)) od: for n from 1 to 25 do seq(coeff(P[n],t,j),j=1..floor((sqrt(8*n+1)-1)/2)) od; # yields sequence in triangular form; Emeric Deutsch, Feb 21 2006
    # second Maple program:
    b:= proc(n, i) b(n, i):= `if`(n=0, [1], `if`(i<1, [], zip((x, y)
          -> x+y, b(n, i-1), `if`(i>n, [], [0, b(n-i, i-1)[]]), 0)))
        end:
    T:= n-> subsop(1=NULL, b(n, n))[]:
    seq(T(n), n=1..40);  # Alois P. Heinz, Nov 18 2012
  • Mathematica
    q[n_, k_] := q[n, k] = If[n < k || k < 1, 0, If[n == 1, 1, q[n-k, k] + q[n-k, k-1]]]; Take[ Flatten[ Table[q[n, k], {n, 1, 24}, {k, 1, Floor[(Sqrt[8n+1] - 1)/2]}]], 91] (* Jean-François Alcover, Aug 01 2011, after PARI prog. *)
    (* As a triangular table: *)
    Table[Coefficient[Series[Product[1+t    x^i,{i,n}],{x,0,n}],x^n t^m],{n,24},{m,n}] (* Wouter Meeussen, Feb 22 2014 *)
    Table[Count[PowersRepresentations[n, k, 1], ?(Nor[MemberQ[#, 0], MemberQ[Differences@ #, 0]] &)], {n, 23}, {k, Floor[(Sqrt[8 n + 1] - 1)/2]}] // Flatten (* _Michael De Vlieger, Jul 12 2017 *)
    nrows = 24; d=Table[Select[IntegerPartitions[n], DeleteDuplicates[#] == # &],{n, nrows}] ;
    Flatten@Table[Table[Count[d[[n]], x_ /; Length[x] == m], {m, Floor[(Sqrt[8 n + 1] - 1)/2]}], {n, nrows}] (* Robert Price, Aug 17 2020 *)
  • PARI
    {Q(n, k) = if( k<0 || k>n,0, polcoeff( polcoeff( prod(i=1, n, 1 + y*x^i, 1 + x * O(x^n)), n), k))}; /* Michael Somos, Dec 04 2002 */
    
  • PARI
    Q(n,k)=if(nPaul D. Hanna
    
  • PARI
    {Q(n, k) = my(u); if( n<1 || k<1 || k>(sqrtint(8*n+1)-1)\2, 0, u = n - k *(k+1)/2; polcoeff( 1 / prod(i=1, k, 1 - x^i, 1 + x*O(x^u)), u))}; /* Michael Somos, Jul 11 2017 */
    
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A008289_T(n,k):
        if k<1 or nA008289_T(n-k,k)+A008289_T(n-k,k-1) # Chai Wah Wu, Sep 22 2023

Formula

G.f.: Product_{n>0} (1 + y*x^n) = 1 + Sum_{n>0, k>0} Q(n, k) * x^n * y^k. - Michael Somos, Dec 04 2002
Q(n, k) = Q(n-k, k) + Q(n-k, k-1) for n>k>=1, with Q(1, 1)=1, Q(n, 0)=0 (n>=1). - Paul D. Hanna, Mar 04 2005
G.f.: Sum_{n>0, k>0} x^n * y^(k*(k+1)/2) / Product_{i=1..k} (1 - y^i). - Michael Somos, Jul 11 2017
Sum_{k>=0} k! * Q(n,k) = A032020(n). - Alois P. Heinz, Feb 25 2020
Q(n, m) = A008284(n - m*(m-1)/2, m) = A026820(n - m*(m+1)/2, m), using for the latter, the extension A026820(n, k) = A026820(n, n) = A000041(n), for every k >= n >= 0. - Álvar Ibeas, Jul 23 2020

Extensions

Additional comments from Michael Somos, Dec 04 2002
Entry revised by N. J. A. Sloane, Nov 20 2006

A048272 Number of odd divisors of n minus number of even divisors of n.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

abs(a(n)) = (1/2) * (number of pairs (i,j) satisfying n = i^2 - j^2 and -n <= i,j <= n). - Benoit Cloitre, Jun 14 2003
As A001227(n) is the number of ways to write n as the difference of 3-gonal numbers, a(n) describes the number of ways to write n as the difference of e-gonal numbers for e in {0,1,4,8}. If pe(n):=(1/2)*n*((e-2)*n+(4-e)) is the n-th e-gonal number, then 4*a(n) = |{(m,k) of Z X Z; pe(-1)(m+k)-pe(m-1)=n}| for e=1, 2*a(n) = |{(m,k) of Z X Z; pe(-1)(m+k)-pe(m-1)=n}| for e in {0,4} and for a(n) itself is a(n) = |{(m,k) of Z X Z; pe(-1)(m+k)-pe(m-1)=n}| for e=8. (Same for e=-1 see A035218.) - Volker Schmitt (clamsi(AT)gmx.net), Nov 09 2004
An argument by Gareth McCaughan suggests that the average of this sequence is log(2). - Hans Havermann, Feb 10 2013 [Supported by a graph. - Vaclav Kotesovec, Mar 01 2023]
From Keith F. Lynch, Jan 20 2024: (Start)
a(n) takes every possible integer value, positive, negative, and zero. Proof: For all nonnegative integers k, a(3^k) = 1+k, a(2^k) = 1-k.
a(n) takes every possible integer value except 1 and -1 infinitely many times. Proof: a(o^(k-1)) = k and a(4*o^(k-1)) = -k for all positive integers k and odd primes o, of which there are infinitely many. a(n) = 0 iff n = 2 (mod 4). a(n) = 1 iff n = 1. a(n) = -1 iff n = 4.
a(n) takes prime value p only for n = o^(p-1), where o is any odd prime.
Terms have a simple pattern that repeats with a period of 4: Positive, zero, positive, negative.
(End)
Inverse Möbius transform of (-1)^(n+1). - Wesley Ivan Hurt, Jun 22 2024

Examples

			a(20) = -2 because 20 = 2^2*5^1 and (1-2)*(1+1) = -2.
G.f. = x + 2*x^3 - x^4 + 2*x^5 + 2*x^7 - 2*x^8 + 3*x^9 + 2*x^11 - 2*x^12 + ...
		

References

  • Louis Comtet, Advanced Combinatorics, Reidel, 1974, p. 162, #16, (6), first formula.
  • S. Ramanujan, Notebooks, Tata Institute of Fundamental Research, Bombay 1957 Vol. 1, see page 97, 7(ii).

Crossrefs

Cf. A048298. A diagonal of A060184.
First differences of A059851.
Indices of records: A053624 (highs), A369151 (lows).

Programs

  • Haskell
    a048272 n = a001227 n - a183063 n  -- Reinhard Zumkeller, Jan 21 2012
    
  • Magma
    [&+[(-1)^(d+1):d in Divisors(n)] :n in [1..95] ]; // Marius A. Burtea, Aug 10 2019
  • Maple
    add(x^n/(1+x^n), n=1..60): series(%,x,59);
    A048272 := proc(n)
        local a;
        a := 1 ;
        for pfac in ifactors(n)[2] do
            if pfac[1] = 2 then
                a := a*(1-pfac[2]) ;
            else
                a := a*(pfac[2]+1) ;
            end if;
        end do:
        a ;
    end proc: # Schmitt, sign corrected R. J. Mathar, Jun 18 2016
    # alternative Maple program:
    a:= n-> -add((-1)^d, d=numtheory[divisors](n)):
    seq(a(n), n=1..100);  # Alois P. Heinz, Feb 28 2018
  • Mathematica
    Rest[ CoefficientList[ Series[ Sum[x^k/(1 - (-x)^k), {k, 111}], {x, 0, 110}], x]] (* Robert G. Wilson v, Sep 20 2005 *)
    dif[n_]:=Module[{divs=Divisors[n]},Count[divs,?OddQ]-Count[ divs, ?EvenQ]]; Array[dif,100] (* Harvey P. Dale, Aug 21 2011 *)
    a[n]:=Sum[-(-1)^d,{d,Divisors[n]}] (* Steven Foster Clark, May 04 2018 *)
    f[p_, e_] := If[p == 2, 1 - e, 1 + e]; a[n_] := Times @@ f @@@ FactorInteger[n]; a[1] = 1; Array[a, 100] (* Amiram Eldar, Jun 09 2022 *)
  • PARI
    {a(n) = if( n<1, 0, -sumdiv(n, d, (-1)^d))}; /* Michael Somos, Jul 22 2006 */
    
  • PARI
    N=17; default(seriesprecision,N); x=z+O(z^(N+1))
    c=sum(j=1,N,j*x^j); \\ log case
    s=-log(prod(j=1,N,(1+x^j)^(1/j)));
    s=serconvol(s,c)
    v=Vec(s) \\ Joerg Arndt, May 03 2008
    
  • PARI
    a(n)=my(o=valuation(n,2),f=factor(n>>o)[,2]);(1-o)*prod(i=1,#f,f[i]+1) \\ Charles R Greathouse IV, Feb 10 2013
    
  • PARI
    a(n)=direuler(p=1,n,if(p==2,(1-2*X)/(1-X)^2,1/(1-X)^2))[n] /* Ralf Stephan, Mar 27 2015 */
    
  • PARI
    {a(n) = my(d = n -> if(frac(n), 0, numdiv(n))); if( n<1, 0, if( n%4, 1, -1) * (d(n) - 2*d(n/2) + 2*d(n/4)))}; /* Michael Somos, Aug 11 2017 */
    

Formula

Coefficients in expansion of Sum_{n >= 1} x^n/(1+x^n) = Sum_{n >= 1} (-1)^(n-1)*x^n/(1-x^n). Expand Sum 1/(1+x^n) in powers of 1/x.
If n = 2^p1*3^p2*5^p3*7^p4*11^p5*..., a(n) = (1-p1)*Product_{i>=2} (1+p_i).
Multiplicative with a(2^e) = 1 - e and a(p^e) = 1 + e if p > 2. - Vladeta Jovovic, Jan 27 2002
a(n) = (-1)*Sum_{d|n} (-1)^d. - Benoit Cloitre, May 12 2003
Moebius transform is period 2 sequence [1, -1, ...]. - Michael Somos, Jul 22 2006
G.f.: Sum_{k>0} -(-1)^k * x^(k^2) * (1 + x^(2*k)) / (1 - x^(2*k)) [Ramanujan]. - Michael Somos, Jul 22 2006
Equals A051731 * [1, -1, 1, -1, 1, ...]. - Gary W. Adamson, Nov 07 2007
From Reinhard Zumkeller, Jan 21 2012: (Start)
a(n) = A001227(n) - A183063(n).
a(A008586(n)) < 0; a(A005843(n)) <= 0; a(A016825(n)) = 0; a(A042968(n)) >= 0; a(A005408(n)) > 0. (End)
a(n) = Sum_{k=0..n} A081362(k)*A015723(n-k). - Mircea Merca, Feb 26 2014
abs(a(n)) = A112329(n) = A094572(n) / 2. - Ray Chandler, Aug 23 2014
From Peter Bala, Jan 07 2015: (Start)
Logarithmic g.f.: log( Product_{n >= 1} (1 + x^n)^(1/n) ) = Sum_{n >= 1} a(n)*x^n/n.
a(n) = A001227(n) - A183063(n). By considering the logarithmic generating functions of these three sequences we obtain the identity
( Product_{n >= 0} (1 - x^(2*n+1))^(1/(2*n+1)) )^2 = Product_{n >= 1} ( (1 - x^n)/(1 + x^n) )^(1/n). (End)
Dirichlet g.f.: zeta(s)*eta(s) = zeta(s)^2*(1-2^(-s+1)). - Ralf Stephan, Mar 27 2015
a(2*n - 1) = A099774(n). - Michael Somos, Aug 12 2017
From Paul D. Hanna, Aug 10 2019: (Start)
G.f.: Sum_{n>=0} x^n * Sum_{k=0..n} binomial(n,k) * (x^(n+1) - x^k)^(n-k) = Sum_{n>=0} a(n)*x^(2*n).
G.f.: Sum_{n>=0} x^n * Sum_{k=0..n} binomial(n,k) * (x^(n+1) + x^k)^(n-k) * (-1)^k = Sum_{n>=0} a(n)*x^(2*n). (End)
a(n) = 2*A000005(2n) - 3*A000005(n). - Ridouane Oudra, Oct 15 2019
Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k)/A000005(k) = 2*log(2)-1. - Amiram Eldar, Mar 01 2023

Extensions

New definition from Vladeta Jovovic, Jan 27 2002

A083710 Number of integer partitions of n with a part dividing all the other parts.

Original entry on oeis.org

1, 1, 2, 3, 5, 6, 11, 12, 20, 25, 37, 43, 70, 78, 114, 143, 196, 232, 330, 386, 530, 641, 836, 1003, 1340, 1581, 2037, 2461, 3127, 3719, 4746, 5605, 7038, 8394, 10376, 12327, 15272, 17978, 22024, 26095, 31730, 37339, 45333, 53175, 64100, 75340, 90138
Offset: 0

Views

Author

N. J. A. Sloane, Jun 16 2003

Keywords

Comments

Since the summand (part) which divides all the other summands is necessarily the smallest, an equivalent definition is: "Number of partitions of n such that smallest part divides every part." - Joerg Arndt, Jun 08 2009
The first few partitions that fail the criterion are 5=3+2, 7=5+2=4+3=3+2+2. So a(5) = A000041(5) - 1 = 6, a(7) = A000041(7) - 3 = 12. - Vladeta Jovovic, Jun 17 2003
Starting with offset 1 = inverse Mobius transform (A051731) of the partition numbers, A000041. - Gary W. Adamson, Jun 08 2009

Examples

			From _Gus Wiseman_, Apr 18 2021: (Start)
The a(1) = 1 through a(7) = 12 partitions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)
       (11)  (21)   (22)    (41)     (33)      (61)
             (111)  (31)    (221)    (42)      (331)
                    (211)   (311)    (51)      (421)
                    (1111)  (2111)   (222)     (511)
                            (11111)  (321)     (2221)
                                     (411)     (3211)
                                     (2211)    (4111)
                                     (3111)    (22111)
                                     (21111)   (31111)
                                     (111111)  (211111)
                                               (1111111)
(End)
		

References

  • L. M. Chawla, M. O. Levan and J. E. Maxfield, On a restricted partition function and its tables, J. Natur. Sci. and Math., 12 (1972), 95-101.

Crossrefs

Cf. A000041, A051731. - Gary W. Adamson, Jun 08 2009
The case with no 1's is A083711.
The strict case is A097986.
The version for "divisible by" instead of "dividing" is A130689.
The case where there is also a part divisible by all the others is A130714.
The complement of these partitions is counted by A338470.
The Heinz numbers of these partitions are dense, complement of A342193.
The case where there is also no part divisible by all the others is A343345.
A000005 counts divisors.
A000070 counts partitions with a selected part.
A006128 counts partitions with a selected position.
A015723 counts strict partitions with a selected part.
A018818 counts partitions into divisors (strict: A033630).
A167865 counts strict chains of divisors > 1 summing to n.

Programs

  • Maple
    with(combinat): with(numtheory): a := proc(n) c := 0: l := sort(convert(divisors(n), list)): for i from 1 to nops(l)-0 do c := c+numbpart(l[i]-1) od: RETURN(c): end: for j from 0 to 60 do printf(`%d, `, a(j)) od: # Zerinvary Lajos, Apr 14 2007
  • Mathematica
    Table[Length[Select[IntegerPartitions[n],And@@IntegerQ/@(#/Min@@#)&]],{n,0,30}] (* Gus Wiseman, Apr 18 2021 *)

Formula

Equals left border of triangle A137587 starting (1, 2, 3, 5, 6, 11, ...). - Gary W. Adamson, Jan 27 2008
G.f.: 1 + Sum_{n>=1} x^n/eta(x^n). The g.f. for partitions into parts that are a multiple of n is x^n/eta(x^n), now sum over n. - Joerg Arndt, Jun 08 2009
Gary W. Adamson's comment is equivalent to the formula a(n) = Sum_{d|n} p(d-1) where p(i) = number of partitions of i (A000041(i)). Hence A083710 has g.f. Sum_{d>=1} p(d-1)*x^d/(1-x^d), - N. J. A. Sloane, Jun 08 2009

Extensions

More terms from Vladeta Jovovic, Jun 17 2003
Name shortened by Gus Wiseman, Apr 18 2021

A264401 Triangle read by rows: T(n,k) is the number of partitions of n having least gap k.

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 3, 2, 4, 4, 2, 1, 4, 6, 4, 1, 7, 8, 5, 2, 8, 11, 8, 3, 12, 15, 10, 4, 1, 14, 20, 15, 6, 1, 21, 26, 19, 9, 2, 24, 35, 27, 12, 3, 34, 45, 34, 17, 5, 41, 58, 47, 23, 6, 1, 55, 75, 59, 31, 10, 1, 66, 96, 79, 41, 13, 2
Offset: 0

Views

Author

Emeric Deutsch, Nov 21 2015

Keywords

Comments

The "least gap" or "mex" of a partition is the least positive integer that is not a part of the partition. For example, the least gap of the partition [7,4,2,2,1] is 3.
Sum of entries in row n is A000041(n).
T(n,1) = A002865(n).
Sum_{k>=1} k*T(n,k) = A022567(n).

Examples

			Row n=5 is 2,3,2; indeed, the least gaps of [5], [4,1], [3,2], [3,1,1], [2,2,1], [2,1,1,1], and [1,1,1,1,1] are 1, 2, 1, 2, 3, 3, and 2, respectively (i.e., two 1s, three 2s, and two 3s).
Triangle begins:
   1
   0   1
   1   1
   1   1   1
   2   2   1
   2   3   2
   4   4   2   1
   4   6   4   1
   7   8   5   2
   8  11   8   3
  12  15  10   4   1
  14  20  15   6   1
  21  26  19   9   2
		

Crossrefs

Row sums are A000041.
Row lengths are A002024.
Column k = 1 is A002865.
Column k = 2 is A027336.
The strict case is A343348.
A000009 counts strict partitions.
A000041 counts partitions.
A000070 counts partitions with a selected part.
A006128 counts partitions with a selected position.
A015723 counts strict partitions with a selected part.
A257993 gives the least gap of the partition with Heinz number n.
A339564 counts factorizations with a selected factor.
A342050 ranks partitions with even least gap.
A342051 ranks partitions with odd least gap.

Programs

  • Maple
    g := (sum(t^j*x^((1/2)*j*(j-1))*(1-x^j), j = 1 .. 80))/(product(1-x^i, i = 1 .. 80)): gser := simplify(series(g, x = 0, 23)): for n from 0 to 30 do P[n] := sort(coeff(gser, x, n)) end do: for n from 0 to 25 do seq(coeff(P[n], t, j), j = 1 .. degree(P[n])) end do; # yields sequence in triangular form
    # second Maple program:
    b:= proc(n, i) option remember; `if`(n=0, `if`(i=0, [1, 0],
          [0, x]), `if`(i<1, 0, (p-> [0, p[2] +p[1]*x^i])(
          b(n, i-1)) +add(b(n-i*j, i-1), j=1..n/i)))
        end:
    T:= n->(p->seq(coeff(p, x, i), i=1..degree(p)))(b(n, n+1)[2]):
    seq(T(n), n=0..20);  # Alois P. Heinz, Nov 29 2015
  • Mathematica
    Needs["Combinatorica`"]; {1, 0}~Join~Flatten[Table[Count[Map[If[# == {}, 0, First@ #] &@ Complement[Range@ n, #] &, Combinatorica`Partitions@ n], n_ /; n == k], {n, 17}, {k, n}] /. 0 -> Nothing] (* Michael De Vlieger, Nov 21 2015 *)
    mingap[q_]:=Min@@Complement[Range[If[q=={},0,Max[q]]+1],q];Table[Length[Select[IntegerPartitions[n],mingap[#]==k&]],{n,0,15},{k,Round[Sqrt[2*(n+1)]]}] (* Gus Wiseman, Apr 19 2021 *)
    b[n_, i_] := b[n, i] = If[n == 0, If[i == 0, {1, 0}, {0, x}], If[i<1, {0, 0}, {0, #[[2]] + #[[1]]*x^i}&[b[n, i-1]] + Sum[b[n-i*j, i - 1], {j, 1, n/i}]]];
    T[n_] := CoefficientList[b[n, n + 1], x][[2]] // Rest;
    T /@ Range[0, 20] // Flatten (* Jean-François Alcover, May 21 2021, after Alois P. Heinz *)

Formula

G.f.: G(t,x) = Sum_{j>=1} (t^j*x^{j(j-1)/2}*(1-x^j))/Product_{i>=1}(1-x^i).

A066189 Sum of all partitions of n into distinct parts.

Original entry on oeis.org

0, 1, 2, 6, 8, 15, 24, 35, 48, 72, 100, 132, 180, 234, 308, 405, 512, 646, 828, 1026, 1280, 1596, 1958, 2392, 2928, 3550, 4290, 5184, 6216, 7424, 8880, 10540, 12480, 14784, 17408, 20475, 24048, 28120, 32832, 38298, 44520, 51660, 59892, 69230, 79904
Offset: 0

Views

Author

Wouter Meeussen, Dec 15 2001

Keywords

Examples

			The strict integer partitions of 6 are {(6), (5,1), (4,2), (3,2,1)} with sum 6+5+1+4+2+3+2+1 = 24. - _Gus Wiseman_, May 09 2019
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, [1, 0], `if`(i>n, [0$2],
          b(n, i+1)+(p-> p+[0, i*p[1]])(b(n-i, i+1))))
        end:
    a:= n-> b(n, 1)[2]:
    seq(a(n), n=0..80);  # Alois P. Heinz, Sep 01 2014
  • Mathematica
    PartitionsQ[ Range[ 60 ] ]Range[ 60 ]
    nmax=60; CoefficientList[Series[x*D[Product[1+x^k, {k, 1, nmax}], x], {x, 0, nmax}], x] (* Vaclav Kotesovec, Nov 21 2016 *)

Formula

G.f.: sum(n>=1, n*q^(n-1)/(1+q^n) ) * prod(n>=1, 1+q^n ). - Joerg Arndt, Aug 03 2011
a(n) = n * A000009(n). - Vaclav Kotesovec, Sep 25 2016
G.f.: x*f'(x), where f(x) = Product_{k>=1} (1 + x^k). - Vaclav Kotesovec, Nov 21 2016
a(n) = A056239(A325506(n)). - Gus Wiseman, May 09 2019

A097986 Number of strict integer partitions of n with a part dividing all the other parts.

Original entry on oeis.org

1, 1, 2, 2, 2, 4, 3, 5, 5, 7, 6, 12, 9, 13, 15, 20, 18, 28, 26, 37, 39, 47, 49, 71, 68, 85, 94, 117, 120, 159, 160, 201, 216, 257, 277, 348, 357, 430, 470, 562, 592, 720, 758, 901, 981, 1134, 1220, 1457, 1542, 1798, 1952, 2250, 2419, 2819, 3023, 3482, 3773, 4291
Offset: 1

Views

Author

Vladeta Jovovic, Oct 23 2004

Keywords

Comments

If n > 0, we can assume such a part is the smallest. - Gus Wiseman, Apr 23 2021
Also the number of uniform (constant multiplicity) partitions of n containing 1, ranked by A367586. The strict case is A096765. The version without 1 is A329436. - Gus Wiseman, Dec 01 2023

Examples

			From _Gus Wiseman_, Dec 01 2023: (Start)
The a(1) = 1 through a(8) = 5 strict partitions with a part dividing all the other parts:
  (1)  (2)  (3)    (4)    (5)    (6)      (7)      (8)
            (2,1)  (3,1)  (4,1)  (4,2)    (6,1)    (6,2)
                                 (5,1)    (4,2,1)  (7,1)
                                 (3,2,1)           (4,3,1)
                                                   (5,2,1)
The a(1) = 1 through a(8) = 5 uniform partitions containing 1:
  (1)  (11)  (21)   (31)    (41)     (51)      (61)       (71)
             (111)  (1111)  (11111)  (321)     (421)      (431)
                                     (2211)    (1111111)  (521)
                                     (111111)             (3311)
                                                          (11111111)
(End)
		

Crossrefs

The non-strict version is A083710.
The case with no 1's is A098965.
The Heinz numbers of these partitions are A339563.
The strict complement is counted by A341450.
The version for "divisible by" instead of "dividing" is A343347.
The case where there is also a part divisible by all the others is A343378.
The case where there is no part divisible by all the others is A343381.
A000005 counts divisors.
A000009 counts strict partitions.
A000070 counts partitions with a selected part.
A006128 counts partitions with a selected position.
A015723 counts strict partitions with a selected part.
A018818 counts partitions into divisors (strict: A033630).
A167865 counts strict chains of divisors > 1 summing to n.

Programs

  • Mathematica
    Take[ CoefficientList[ Expand[ Sum[x^k*Product[1 + x^(k*i), {i, 2, 62}], {k, 62}]], x], {2, 60}] (* Robert G. Wilson v, Nov 01 2004 *)
    Table[Length[Select[IntegerPartitions[n], UnsameQ@@#&&Or@@Table[And@@IntegerQ/@(#/x), {x,#}]&]], {n,0,30}] (* Gus Wiseman, Apr 23 2021 *)
  • PARI
    A_x(N) = {my(x='x+O('x^N)); Vec(sum(k=1,N,x^k*prod(i=2,N-k, (1+x^(k*i)))))}
    A_x(50) \\ John Tyler Rascoe, Nov 19 2024

Formula

a(n) = Sum_{d|n} A025147(d-1).
G.f.: Sum_{k>=1} (x^k*Product_{i>=2} (1+x^(k*i))).
a(n) ~ exp(Pi*sqrt(n/3)) / (8*3^(1/4)*n^(3/4)). - Vaclav Kotesovec, Jul 06 2025

Extensions

More terms from Robert G. Wilson v, Nov 01 2004
Name shortened by Gus Wiseman, Apr 23 2021

A130689 Number of partitions of n such that every part divides the largest part; a(0) = 1.

Original entry on oeis.org

1, 1, 2, 3, 5, 6, 10, 11, 16, 19, 26, 28, 41, 43, 56, 65, 82, 88, 115, 122, 155, 174, 209, 225, 283, 305, 363, 402, 477, 514, 622, 666, 783, 858, 990, 1078, 1268, 1362, 1561, 1708, 1958, 2111, 2433, 2613, 2976, 3247, 3652, 3938, 4482, 4821, 5422
Offset: 0

Views

Author

Vladeta Jovovic, Jul 01 2007

Keywords

Comments

First differs from A130714 at a(11) = 28, A130714(11) = 27. - Gus Wiseman, Apr 23 2021

Examples

			For n = 6 we have 10 such partitions: [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 2], [1, 1, 2, 2], [2, 2, 2], [1, 1, 1, 3], [3, 3], [1, 1, 4], [2, 4], [1, 5], [6].
From _Gus Wiseman_, Apr 18 2021: (Start)
The a(1) = 1 through a(8) = 16 partitions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (21)   (22)    (41)     (33)      (61)       (44)
             (111)  (31)    (221)    (42)      (331)      (62)
                    (211)   (311)    (51)      (421)      (71)
                    (1111)  (2111)   (222)     (511)      (422)
                            (11111)  (411)     (2221)     (611)
                                     (2211)    (4111)     (2222)
                                     (3111)    (22111)    (3311)
                                     (21111)   (31111)    (4211)
                                     (111111)  (211111)   (5111)
                                               (1111111)  (22211)
                                                          (41111)
                                                          (221111)
                                                          (311111)
                                                          (2111111)
                                                          (11111111)
(End)
		

Crossrefs

The dual version is A083710.
The case without 1's is A339619.
The Heinz numbers of these partitions are the complement of A343337.
The complement is counted by A343341.
The strict case is A343347.
The complement in the strict case is counted by A343377.
A000009 counts strict partitions.
A000041 counts partitions.
A000070 counts partitions with a selected part.
A006128 counts partitions with a selected position.
A015723 counts strict partitions with a selected part.
A072233 counts partitions by sum and greatest part.

Programs

  • Mathematica
    Table[If[n==0,1,Length[Select[IntegerPartitions[n],FreeQ[#,1]&&And@@IntegerQ/@(Max@@#/#)&]]],{n,0,30}] (* Gus Wiseman, Apr 18 2021 *)
  • PARI
    seq(n)={Vec(1 + sum(m=1, n, my(u=divisors(m)); x^m/prod(i=1, #u, 1 - x^u[i] + O(x^(n-m+1)))))} \\ Andrew Howroyd, Apr 17 2021

Formula

G.f.: 1 + Sum_{n>0} x^n/Product_{d divides n} (1-x^d).
Showing 1-10 of 76 results. Next