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.

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

A339564 Number of ways to choose a distinct factor in a factorization of n (pointed factorizations).

Original entry on oeis.org

0, 1, 1, 2, 1, 3, 1, 4, 2, 3, 1, 7, 1, 3, 3, 7, 1, 7, 1, 7, 3, 3, 1, 14, 2, 3, 4, 7, 1, 10, 1, 12, 3, 3, 3, 17, 1, 3, 3, 14, 1, 10, 1, 7, 7, 3, 1, 26, 2, 7, 3, 7, 1, 14, 3, 14, 3, 3, 1, 25, 1, 3, 7, 19, 3, 10, 1, 7, 3, 10, 1, 36, 1, 3, 7, 7, 3, 10, 1, 26, 7, 3
Offset: 1

Views

Author

Gus Wiseman, Apr 10 2021

Keywords

Examples

			The pointed factorizations of n for n = 2, 4, 6, 8, 12, 24, 30:
  ((2))  ((4))    ((6))    ((8))      ((12))     ((24))       ((30))
         ((2)*2)  ((2)*3)  ((2)*4)    ((2)*6)    ((3)*8)      ((5)*6)
                  (2*(3))  (2*(4))    (2*(6))    (3*(8))      (5*(6))
                           ((2)*2*2)  ((3)*4)    ((4)*6)      ((2)*15)
                                      (3*(4))    (4*(6))      (2*(15))
                                      ((2)*2*3)  ((2)*12)     ((3)*10)
                                      (2*2*(3))  (2*(12))     (3*(10))
                                                 ((2)*2*6)    ((2)*3*5)
                                                 (2*2*(6))    (2*(3)*5)
                                                 ((2)*3*4)    (2*3*(5))
                                                 (2*(3)*4)
                                                 (2*3*(4))
                                                 ((2)*2*2*3)
                                                 (2*2*2*(3))
		

Crossrefs

The additive version is A000070 (strict: A015723).
The unpointed version is A001055 (strict: A045778, ordered: A074206, listed: A162247).
Allowing point (1) gives A057567.
Choosing a position instead of value gives A066637.
The ordered additive version is A336875.
A000005 counts divisors.
A001787 count normal multisets with a selected position.
A001792 counts compositions with a selected position.
A006128 counts partitions with a selected position.
A066186 count strongly normal multisets with a selected position.
A254577 counts ordered factorizations with a selected position.

Programs

  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    Table[Sum[Length[Union[fac]],{fac,facs[n]}],{n,50}]

Formula

a(n) = A057567(n) - A001055(n).
a(n) = Sum_{d|n, d>1} A001055(n/d).

A066637 Total number of elements in all factorizations of n with all factors > 1.

Original entry on oeis.org

0, 1, 1, 3, 1, 3, 1, 6, 3, 3, 1, 8, 1, 3, 3, 12, 1, 8, 1, 8, 3, 3, 1, 17, 3, 3, 6, 8, 1, 10, 1, 20, 3, 3, 3, 22, 1, 3, 3, 17, 1, 10, 1, 8, 8, 3, 1, 34, 3, 8, 3, 8, 1, 17, 3, 17, 3, 3, 1, 27, 1, 3, 8, 35, 3, 10, 1, 8, 3, 10, 1, 46, 1, 3, 8, 8, 3, 10, 1, 34, 12, 3, 1, 27, 3, 3, 3, 17, 1, 27, 3, 8, 3, 3, 3
Offset: 1

Views

Author

Amarnath Murthy, Dec 28 2001

Keywords

Comments

From Gus Wiseman, Apr 18 2021: (Start)
Number of ways to choose a factor index or position in a factorization of n. The version selecting a factor value is A339564. For example, the factorizations of n = 2, 4, 8, 12, 16, 24, 30 with a selected position (in parentheses) are:
((2)) ((4)) ((8)) ((12)) ((16)) ((24)) ((30))
((2)*2) ((2)*4) ((2)*6) ((2)*8) ((3)*8) ((5)*6)
(2*(2)) (2*(4)) (2*(6)) (2*(8)) (3*(8)) (5*(6))
((2)*2*2) ((3)*4) ((4)*4) ((4)*6) ((2)*15)
(2*(2)*2) (3*(4)) (4*(4)) (4*(6)) (2*(15))
(2*2*(2)) ((2)*2*3) ((2)*2*4) ((2)*12) ((3)*10)
(2*(2)*3) (2*(2)*4) (2*(12)) (3*(10))
(2*2*(3)) (2*2*(4)) ((2)*2*6) ((2)*3*5)
((2)*2*2*2) (2*(2)*6) (2*(3)*5)
(2*(2)*2*2) (2*2*(6)) (2*3*(5))
(2*2*(2)*2) ((2)*3*4)
(2*2*2*(2)) (2*(3)*4)
(2*3*(4))
((2)*2*2*3)
(2*(2)*2*3)
(2*2*(2)*3)
(2*2*2*(3))
(End)

Examples

			a(12) = 8: there are 4 factorizations of 12: (12), (6*2), (4*3), (3*2*2) having 1, 2, 2, 3 elements respectively, a total of 8.
		

References

  • Amarnath Murthy, Generalization of Partition function, Introducing Smarandache Factor partitions, Smarandache Notions Journal, Vol. 11, 1-2-3, Spring 2000.
  • Amarnath Murthy, Length and extent of Smarandache Factor partitions, Smarandache Notions Journal, Vol. 11, 1-2-3, Spring 2000.

Crossrefs

The version for normal multisets is A001787.
The version for compositions is A001792.
The version for partitions is A006128 (strict: A015723).
Choosing a value instead of position gives A339564.
A000070 counts partitions with a selected part.
A001055 counts factorizations.
A002033 and A074206 count ordered factorizations.
A067824 counts strict chains of divisors starting with n.
A336875 counts compositions with a selected part.

Programs

  • Maple
    # Return a list of lists which are factorizations (product representations)
    # of n. Within each sublist, the factors are sorted. A minimum factor in
    # each element of sublists returned can be specified with 'mincomp'.
    # If mincomp=2, the number of sublists contained in the list returned is A001055(n).
    # Example:
    # n=8 and mincomp=2 return [[2,2,2],[4,8],[8]]
    listProdRep := proc(n,mincomp)
        local dvs,resul,f,i,j,rli,tmp ;
        resul := [] ;
        # list returned is empty if n < mincomp
        if n >= mincomp then
            if n = 1 then
                RETURN([1]) ;
            else
                # compute the divisors, and take each divisor
                # as a head element (minimum element) of one of the
                # sublists. Example: for n=8 use {1,2,4,8}, and consider
                # (for mincomp=2) sublists [2,...], [4,...] and [8].
                dvs := numtheory[divisors](n) ;
                for i from 1 to nops(dvs) do
                    # select the head element 'f' from the divisors
                    f := op(i,dvs) ;
                    # if this is already the maximum divisor n
                    # itself, this head element is the last in
                    # the sublist
                    if f =n and f >= mincomp then
                        resul := [op(resul),[f]] ;
                    elif f >= mincomp then
                        # if this is not the maximum element
                        # n itself, produce all factorizations
                        # of the remaining factor recursively.
                        rli := procname(n/f,f) ;
                        # Prepend all the results produced
                        # from the recursion with the head
                        # element for the result.
                        for j from 1 to nops(rli) do
                            tmp := [f,op(op(j,rli))] ;
                            resul := [op(resul),tmp] ;
                        od ;
                    fi ;
                od ;
            fi ;
        fi ;
        resul ;
    end:
    A066637 := proc(n)
        local f,d;
        a := 0 ;
        for d in listProdRep(n,2) do
            a := a+nops(d) ;
        end do:
        a ;
    end proc: # R. J. Mathar, Jul 11 2013
    # second Maple program:
    with(numtheory):
    b:= proc(n, k) option remember; `if`(n>k, 0, [1$2])+
          `if`(isprime(n), 0, (p-> p+[0, p[1]])(add(
          `if`(d>k, 0, b(n/d, d)), d=divisors(n) minus {1, n})))
        end:
    a:= n-> `if`(n<2, 0, b(n$2)[2]):
    seq(a(n), n=1..120); # Alois P. Heinz, Feb 12 2019
  • Mathematica
    g[1, r_] := g[1, r]={1, 0}; g[n_, r_] := g[n, r]=Module[{ds, i, val}, ds=Select[Divisors[n], 1<#<=r&]; val={0, 0}+Sum[g[n/ds[[i]], ds[[i]]], {i, 1, Length[ds]}]; val+{0, val[[1]]}]; a[n_] := g[n, n][[2]]; a/@Range[95] (* g[n, r] = {c, f}, where c is the number of factorizations of n with factors <= r and f is the total number of factors in them. - Dean Hickerson, Oct 28 2002 *)
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];Table[Sum[Length[fac],{fac,facs[n]}],{n,50}] (* Gus Wiseman, Apr 18 2021 *)

A097910 Number of parts in all compositions of n into distinct parts.

Original entry on oeis.org

1, 1, 5, 5, 9, 27, 31, 49, 71, 185, 207, 339, 457, 685, 1421, 1745, 2577, 3615, 5143, 6877, 13439, 15965, 23823, 31983, 45553, 59425, 83549, 139013, 173769, 244803, 330391, 452257, 597935, 810929, 1052559, 1692723, 2074321, 2890333, 3783821, 5178041, 6658377
Offset: 1

Views

Author

Vladeta Jovovic, Sep 04 2004

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1,
          `if`(n>i*(i+1)/2, [][], zip((x, y)->x+y, [b(n, i-1)],
          `if`(i>n, [], [0, b(n-i, i-1)]), 0)[]))
        end:
    a:= n-> (l-> add(i*l[i+1]*i!, i=1..nops(l)-1))([b(n$2)]):
    seq(a(n), n=1..50);  # Alois P. Heinz, Nov 20 2012
    # second Maple program:
    b:= proc(n, i, p) option remember; `if`(i*(i+1)/2 b(n$2, 0):
    seq(a(n), n=0..50);  # Alois P. Heinz, Aug 10 2020
  • Mathematica
    Drop[ CoefficientList[ Series[ Sum[ k*k!*x^((k^2 + k)/2)/Product[1 - x^j, {j, 1, k}], {k, 1, 45}], {x, 0, 40}], x], 1] (* Robert G. Wilson v, Sep 08 2004 *)

Formula

G.f.: Sum(k >= 0; k*k! x^((k^2+k)/2) / Prod(1<=j<=k; 1-x^j)).
a(n) = Sum_{k=1..floor((sqrt(8*n+1)-1)/2)} k! * k * A008289(n,k). - Alois P. Heinz, Aug 10 2020

Extensions

More terms from Robert G. Wilson v and John W. Layman, Sep 08 2004

A336516 Sum of parts, counted without multiplicity, in all compositions of n.

Original entry on oeis.org

0, 1, 3, 10, 24, 59, 136, 309, 682, 1493, 3223, 6904, 14675, 31013, 65202, 136512, 284748, 592082, 1227709, 2539516, 5241640, 10798133, 22206568, 45597489, 93495667, 191464970, 391636718, 800233551, 1633530732, 3331568080, 6789078236, 13824212219, 28129459098
Offset: 0

Views

Author

Alois P. Heinz, Jul 24 2020

Keywords

Examples

			a(4) = 1 + 1 + 2 + 1 + 2 + 1 + 2 + 2 + 1 + 3 + 3 + 1 + 4 = 24: (1)111, (1)1(2), (1)(2)1, (2)(1)1, (2)2, (1)(3), (3)(1), (4).
		

Crossrefs

Cf. A001787 (all parts), A014153 (the same for partitions), A336511, A336512, A336579, A336875.

Programs

  • Maple
    b:= proc(n, i, p) option remember; `if`(n=0, [p!, 0],
          `if`(i<1, 0, add((p-> [0, `if`(j=0, 0, p[1]*i)]+p)(
             b(n-i*j, i-1, p+j)/j!), j=0..n/i)))
        end:
    a:= n-> b(n$2, 0)[2]:
    seq(a(n), n=0..38);
  • Mathematica
    b[n_, i_, p_] := b[n, i, p] = If[n == 0, {p!, 0},
         If[i < 1, {0, 0}, Sum[Function[{0, If[j == 0, 0, #[[1]]*i]} + #][
           b[n - i*j, i - 1, p + j]/j!], {j, 0, n/i}]]];
    a[n_] := b[n, n, 0][[2]];
    Table[a[n], {n, 0, 38}] (* Jean-François Alcover, Mar 11 2022, after Alois P. Heinz *)
Showing 1-5 of 5 results.