login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A000070 a(n) = Sum_{k=0..n} p(k) where p(k) = number of partitions of k (A000041).
(Formerly M1054 N0396)
433

%I M1054 N0396 #411 Feb 13 2024 11:40:14

%S 1,2,4,7,12,19,30,45,67,97,139,195,272,373,508,684,915,1212,1597,2087,

%T 2714,3506,4508,5763,7338,9296,11732,14742,18460,23025,28629,35471,

%U 43820,53963,66273,81156,99133,120770,146785,177970,215308,259891,313065,376326,451501

%N a(n) = Sum_{k=0..n} p(k) where p(k) = number of partitions of k (A000041).

%C Also the total number of all different integers in all partitions of n + 1. E.g., a(3) = 7 because the partitions of 4 comprise the sets {1},{1, 2},{2},{1, 3},{4} of different integers and their total number is 7. - _Thomas Wieder_, Apr 10 2004

%C With offset 1, also the number of 1's in all partitions of n. For example, 3 = 2+1 = 1+1+1, a(3) = (zero 1's) + (one 1's) + (three 1's), so a(3) = 4. - _Naohiro Nomoto_, Jan 09 2002. See the Riordan reference p. 184, last formula, first term, for a proof based on Fine's identity given in Riordan, p. 182 (20).

%C Also, number of partitions of n into parts when there are two kinds of parts of size one.

%C Also number of graphical forest partitions of 2n+2.

%C a(n) = count 2 for each partition of n and 1 for each decrement. E.g., the partitions of 4 are 4 (2), 31 (3), 22 (2), 211 (3) and 1111 (2). 2 + 3 + 2 + 3 + 2 = 12. This is related to the Ferrers representation. We can see that taking the Ferrers diagram for each partition of n and adding a new * to all available columns, we generate each partition of n+1, but with repeats (A058884). - _Jon Perry_, Feb 06 2004

%C Also the number of 1-transitions among all integer partitions of n. A 1-transition is the removal of a digit "1" from a partition containing at least one "1" and subsequent addition of that "1" to another digit in that partition. This other digit may be a "1" also, but all digits of equal amount are considered as undistinquishable (unlabeled). E.g., for n=6 one has the partition [1113] for which the following two 1-transitions are possible: [1113] --> [123] and [1113] --> [114]. The 1-transitions of n form a partial order (poset). For n=6 one has 12 1-transitions: [111111] --> [11112], [11112] --> [1113], [11112] --> [1122], [1113] --> [114], [1113] --> [123], [1122] --> [123], [1122] --> [222], [123] --> [33], [123] --> [24], [114] --> [15], [114] --> [24], [15] --> [6]. - _Thomas Wieder_, Mar 08 2005

%C Also number of partitions of 2n+1 where one of the parts is greater than n (also where there are more than n parts) and of 2n+2 where one of the parts is greater than n+1 (or with more than n+1 parts). - _Henry Bottomley_, Aug 01 2005

%C Equals left border of triangle A137633 - _Gary W. Adamson_, Jan 31 2008

%C Equals row sums of triangle A027293. - _Gary W. Adamson_, Oct 26 2008

%C Convolved with A010815 = [1,1,1,...]. n-th partial sum of A000041 convolved with A010815 = the binomial sequence starting (1, n, ...). - _Gary W. Adamson_, Nov 09 2008

%C Equals A036469 convolved with A035363. - _Gary W. Adamson_, Jun 09 2009

%C a(A004526(n)) = A025065(n). - _Reinhard Zumkeller_, Jan 23 2010

%C a(n) = if n <= 1 then A054225(1,n) else A054225(n,1). - _Reinhard Zumkeller_, Nov 30 2011

%C Also the total number of 1's among all hook-lengths in all partitions of n. E.g., a(4)=7 because hooks of the partitions of n = 4 comprise the multisets {4,3,2,1}, {4,2,1,1}, {3,2,2,1}, {4,1,2,1}, {4,3,2,1} and their total number of 1's is 7. - _T. Amdeberhan_, Jun 03 2012

%C With offset 1, a(n) is also the difference between the sum of largest and the sum of second largest elements in all partitions of n. More generally, the number of occurrences of k in all partitions of n equals the difference between the sum of k-th largest and the sum of (k+1)st largest elements in all partitions of n. And more generally, the sum of the number of occurrences of k, k+1, k+2..k+m in all partitions of n equals the difference between the sum of k-th largest and the sum of (k+m+1)st largest elements in all partitions of n. - _Omar E. Pol_, Oct 25 2012

%C a(0) = 1 and 2*a(n-1) >= a(n) for all n > 0. Hence a(n) is a complete sequence. - _Frank M Jackson_, Apr 08 2013

%C a(n) is the number of conjugacy classes in the order-preserving, order-decreasing and (order-preserving and order-decreasing) injective transformation semigroups. - _Ugbene Ifeanyichukwu_, Jun 03 2015

%C a(n) is also the number of unlabeled subgraphs of the n-cycle C_n. For example, for n = 3, there are 3 unlabeled subgraphs of the triangle C_3 with 0 edges, 2 with 1 edge, 1 with 2 edges, and 1 with 3 edges (C_3 itself), so a(3) = 3 + 2 + 1 + 1 = 7. - _John P. McSorley_, Nov 21 2016

%C a(n) is also the number of partitions of 2n with all parts either even or equal to 1. Proof: the number of such partitions of 2n with exactly 2k 1's is p(n-k), for k = 0,..,n. Summing over k gives the formula. - _Leonard Chastkofsky_, Jul 24 2018

%C a(n) is the total number of polygamma functions that appear in the expansion of the (n+1)st derivative of x! with respect to x. More specifically, a(n) is the number of times the string "PolyGamma" appears in the expansion of D[x!, {x, n + 1}] in Mathematica. For example, D[x!, {x, 3 + 1}] = Gamma[1 + x] PolyGamma[0, 1 + x]^4 + 6 Gamma[1 + x] PolyGamma[0, 1 + x]^2 PolyGamma[1, 1 + x] + 3 Gamma[1 + x] PolyGamma[1, 1 + x]^2 + 4 Gamma[1 + x] PolyGamma[0, 1 + x] PolyGamma[2, 1 + x] + Gamma[1 + x] PolyGamma[3, 1 + x], and we see that the string "PolyGamma" appears a total of a(3) = 7 times in this expansion. - _John M. Campbell_, Aug 11 2018

%C With offset 1, also the number of integer partitions of 2n that do not comprise the multiset of vertex-degrees of any multigraph (i.e., non-multigraphical partitions); see A209816 for multigraphical partitions. - _Gus Wiseman_, Oct 26 2018

%C Also a(n) is the number of partitions of 2n+1 with exactly one odd part.

%C Delete the odd part 2k+1, k=0, ..., n, to get a partition of 2n-2k into even parts. There are as many unrestricted partitions of n-k; now sum those numbers from 0 to n to get a(n). - _George Beck_, Jul 22 2019

%C In the Young's lattice, a(n) is the number of branches that connect the (n-1)-th layer to the n-th layer. - _Shouvik Datta_, Sep 19 2021

%C a(n) is the number of multiset partitions of the multiset {r^n, s^1}, equivalently, factorization patterns of any number m=p^n*q^1 where p and q are primes. - _Joerg Arndt_, Jan 01 2024

%D H. Gupta, An asymptotic formula in partitions. J. Indian Math. Soc., (N. S.) 10 (1946), 73-76.

%D H. Gupta et al., Tables of Partitions. Royal Society Mathematical Tables, Vol. 4, Cambridge Univ. Press, 1958, p. 90.

%D R. Honsberger, Mathematical Gems III, M.A.A., 1985, p. 6.

%D D. E. Knuth, The Art of Computer Programming, Vol. 4A, Table A-1, page 778. - _N. J. A. Sloane_, Dec 30 2018

%D A. M. Odlyzko, Asymptotic Enumeration Methods, p. 19

%D J. Riordan, Combinatorial Identities, Wiley, 1968, p. 199.

%D N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%D Stanley, R. P., Exercise 1.26 in Enumerative Combinatorics, Vol. 1. Cambridge, England: Cambridge University Press, p. 59, 1999.

%H T. D. Noe, <a href="/A000070/b000070.txt">Table of n, a(n) for n = 0..1000</a>

%H P. A. Baikov and S. V. Mikhailov, <a href="https://doi.org/10.1007/JHEP09(2022)185">The {beta}-expansion for Adler function, Bjorken Sum Rule, and the Crewther-Broadhurst-Kataev relation at order O(alpha_s^4)</a>, J. High Energy Phys. 09 (2022) Art. No. 185. See also arXiv:<a href="https://arxiv.org/abs/2206.14063">2206.14063</a> [hep-ph], 2022.

%H Kevin Beanland and Hung Viet Chu, <a href="https://arxiv.org/abs/2311.01926">On Schreier-type Sets, Partitions, and Compositions</a>, arXiv:2311.01926 [math.CO], 2023.

%H David Benson, Radha Kessar, and Markus Linckelmann, <a href="https://arxiv.org/abs/2204.09970">Hochschild cohomology of symmetric groups in low degrees</a>, arXiv:2204.09970 [math.GR], 2022.

%H L. Bracci and L. E. Picasso, <a href="http://dx.doi.org/10.1140/epjp/i2012-12119-6">A simple iterative method to write the terms of any order of perturbation theory in quantum mechanics</a>, The European Physical Journal Plus, 127 (2012), Article 119. - From _N. J. A. Sloane_, Dec 31 2012

%H Emmanuel Briand, Samuel A. Lopes, and Mercedes Rosas, <a href="https://arxiv.org/abs/1811.00857">Normally ordered forms of powers of differential operators and their combinatorics</a>, arXiv:1811.00857 [math.CO], 2018.

%H C. C. Cadogan, <a href="http://www.fq.math.ca/Scanned/9-3/cadogan.pdf">On partly ordered partitions of a positive integer</a>, Fib. Quart., 9 (1971), 329-336.

%H P. J. Cameron, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL3/groups.html">Sequences realized by oligomorphic permutation groups</a>, J. Integ. Seqs. Vol. 3 (2000), #00.1.5.

%H M. S. Cheema and H. Gupta, <a href="/A002755/a002755.pdf">Tables of Partitions of Gaussian Integers</a>, National Institute of Sciences of India, Mathematical Tables, Vol. 1, New Delhi, 1956. (Annotated scanned pages from, plus a review)

%H Mario De Salvo, Dario Fasino, Domenico Freni and Giovanni Lo Faro, <a href="http://hdl.handle.net/11390/1089918">A Family of 0-Simple Semihypergroups Related to Sequence A000070</a>, Journal of Multiple-Valued Logic & Soft Computing, 2016, Vol. 27, Issue 5/6, pp. 553-572.

%H Mario De Salvo, Dario Fasino, Domenico Freni, and Giovanni Lo Faro, <a href="https://doi.org/10.2298/FIL1812177S">Semihypergroups Obtained by Merging of 0-semigroups with Groups</a>, Filomat 32(12) (2018), 4177-4194.

%H P. Flajolet and B. Salvy, <a href="http://www.emis.de/journals/EM/expmath/volumes/7/7.html">Euler sums and contour integral representations</a>, Experimental Mathematics, 7(1) (1998), 15-35.

%H D. Frank, C. D. Savage and J. A. Sellers, <a href="http://www.combinatorialmath.ca/ArsCombinatoria/Vol65.html">On the Number of Graphical Forest Partitions</a>, Ars Combinatoria, Vol. 65 (2002), 33-37.

%H D. Frank, C. D. Savage and J. A. Sellers, <a href="https://people.engr.ncsu.edu/savage/PAPERS/forests.pdf">On the Number of Graphical Forest Partitions</a>, preprint.

%H Manosij Ghosh Dastidar and Sourav Sen Gupta, <a href="http://arxiv.org/abs/1111.0094">Generalization of a few results in Integer Partitions</a>, arXiv preprint arXiv:1111.0094 [cs.DM], 2011.

%H Petros Hadjicostas, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL20/Hadjicostas/hadji5.html">Cyclic, Dihedral and Symmetrical Carlitz Compositions of a Positive Integer</a>, Journal of Integer Sequences, 20 (2017), Article #17.8.5.

%H Guo-Niu Han, <a href="https://arxiv.org/abs/2006.14070">Enumeration of Standard Puzzles</a>, arXiv:2006.14070 [math.CO], 2020.

%H Guo-Niu Han, <a href="/A196265/a196265.pdf">Enumeration of Standard Puzzles</a> [Cached copy]

%H M. D. Hirschhorn, <a href="https://www.fq.math.ca/Papers1/51-4/HirschhornNumberOnes.pdf">The number of 1's in the partitions of n</a>, Fib. Quart., 51 (2013), 326-329.

%H M. D. Hirschhorn, <a href="https://www.fq.math.ca/Papers1/52-1/HirschhorPartitionsofn.pdf">The number of different parts in the partitions of n</a>, Fib. Quart., 52 (2014), 10-15. See p. 11. - _N. J. A. Sloane_, Mar 25 2014

%H Nick Hobson, <a href="https://web.archive.org/web/20160802192148/http://www.qbyte.org/puzzles/p056s.html">Solution to puzzle 56: Partition identity</a>

%H INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=113">Encyclopedia of Combinatorial Structures 113</a>.

%H INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=126">Encyclopedia of Combinatorial Structures 126</a>.

%H MathOverflow, <a href="https://mathoverflow.net/questions/404325/number-of-branches-between-two-layers-of-the-youngs-lattice/">Number of branches between two layers of the Young's lattice</a>, Sep 19 2021.

%H Mikhailov, S. V. <a href="https://doi.org/10.1007/JHEP04(2017)169">On a realization of beta-expansion in QCD</a>, J. High Energy Phys. 2017, No. 4, Paper No. 169, 16 p. (2017).

%H M. M. Mogbonju, O. A. Ojo, and I. A. Ogunleke, <a href="https://www.ijsr.net/archive/v3i12/T0NUMTQ4NTg=.pdf">Graphical Representation of Conjugacy Classes in the Order-Preserving Partial One-One Transformation Semigroup</a>, International Journal of Science and Research (IJSR), 3(12) (2014), 711-721.

%H G. Pfeiffer, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL7/Pfeiffer/pfeiffer6.html">Counting Transitive Relations</a>, Journal of Integer Sequences, Vol. 7 (2004), Article 04.3.2.

%H F. Ruskey, <a href="http://combos.org">Combinatorial Object Server</a>.

%H Maria Schuld, Kamil Brádler, Robert Israel, Daiqin Su, and Brajesh Gupt, <a href="https://arxiv.org/abs/1905.12646">A quantum hardware-induced graph kernel based on Gaussian Boson Sampling</a>, arXiv:1905.12646 [quant-ph], 2019.

%H N. J. A. Sloane, <a href="/transforms.txt">Transforms</a>

%H I. J. Ugbene, E. O. Eze, and S. O. Makanjuola, <a href="http://www.akamaiuniversity.us/PJST14_1_182.pdf">On the Number of Conjugacy Classes in the Injective Order-Decreasing Transformation Semigroup</a>, Pacific Journal of Science and Technology, 14(1) (2013), 182-186.

%H Ifeanyichukwu Jeff Ugbene, Gatta Naimat Bakare, and Garba Risqot Ibrahim, <a href="https://jostmed.futminna.edu.ng/images/JOSTMED/Jostmed_152_June_2019/8._Conjugacy_Classes_of_the_Order-Preserving_and_Order-Decreasing_Partial_One-to-One_Transformation_Semigroups.pdf">Conjugacy classes of the order-preserving and order-decreasing partial one-to-one transformation semigroups</a>, Journal of Science, Technology, Mathematics and Education (JOSTMED), 15(2) (2019), 83-88.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/StanleysTheorem.html">Stanley's Theorem</a>.

%F Euler transform of [ 2, 1, 1, 1, 1, 1, 1, ...].

%F log(a(n)) ~ -3.3959 + 2.44613*sqrt(n). - _Robert G. Wilson v_, Jan 11 2002

%F a(n) = (1/n)*Sum_{k=1..n} (sigma(k)+1)*a(n-k), n > 1, a(0) = 1. - _Vladeta Jovovic_, Aug 22 2002

%F G.f.: (1/(1 - x))*Product_{m >= 1} 1/(1 - x^m).

%F a(n) seems to have the same parity as A027349(n+1). Comment from _James A. Sellers_, Mar 08 2006: that is true.

%F a(n) = A000041(2n+1) - A110618(2n+1) = A000041(2n+2) - A110618(2n+2). - _Henry Bottomley_, Aug 01 2005

%F Row sums of triangle A133735. - _Gary W. Adamson_, Sep 22 2007

%F a(n) = A092269(n+1) - A195820(n+1). - _Omar E. Pol_, Oct 20 2011

%F a(n) = A181187(n+1,1) - A181187(n+1,2). - _Omar E. Pol_, Oct 25 2012

%F From _Peter Bala_, Dec 23 2013: (Start)

%F Gupta gives the asymptotic result a(n-1) ~ sqrt(6/Pi^2)* sqrt(n)*p(n), where p(n) is the partition function A000041(n).

%F Let P(2,n) denote the set of partitions of n into parts k >= 2.

%F a(n-2) = Sum_{parts k in all partitions in P(2,n)} phi(k), where phi(k) is the Euler totient function (see A000010). Using this result and Mertens's theorem on the average order of the phi function, leads to the asymptotic result

%F a(n-2) ~ (6/Pi^2)*n*(p(n) - p(n-1)) = (6/Pi^2)*A138880(n) as n -> infinity. (End)

%F a(n) ~ exp(Pi*sqrt(2*n/3)) / (2^(3/2)*Pi*sqrt(n)) * (1 + 11*Pi/(24*sqrt(6*n)) + (73*Pi^2 - 1584)/(6912*n)). - _Vaclav Kotesovec_, Oct 26 2016

%F a(n) = A024786(n+2) + A024786(n+1). - _Vaclav Kotesovec_, Nov 05 2016

%F G.f.: exp(Sum_{k>=1} (sigma_1(k) + 1)*x^k/k). - _Ilya Gutkovskiy_, Aug 21 2018

%F a(n) = A025065(2n). - _Gus Wiseman_, Oct 26 2018

%F a(n - 1) = A000041(2n) - A209816(n). - _Gus Wiseman_, Oct 26 2018

%e G.f. = 1 + 2*x + 4*x^2 + 7*x^3 + 12*x^4 + 19*x^5 + 30*x^6 + 45*x^7 + 67*x^8 + ...

%e From _Omar E. Pol_, Oct 25 2012: (Start)

%e For n = 5 consider the partitions of n+1:

%e --------------------------------------

%e . Number

%e Partitions of 6 of 1's

%e --------------------------------------

%e 6 .......................... 0

%e 3 + 3 ...................... 0

%e 4 + 2 ...................... 0

%e 2 + 2 + 2 .................. 0

%e 5 + 1 ...................... 1

%e 3 + 2 + 1 .................. 1

%e 4 + 1 + 1 .................. 2

%e 2 + 2 + 1 + 1 .............. 2

%e 3 + 1 + 1 + 1 .............. 3

%e 2 + 1 + 1 + 1 + 1 .......... 4

%e 1 + 1 + 1 + 1 + 1 + 1 ...... 6

%e ------------------------------------

%e 35-16 = 19

%e .

%e The difference between the sum of the first column and the sum of the second column of the set of partitions of 6 is 35 - 16 = 19 and equals the number of 1's in all partitions of 6, so the 6th term of this sequence is a(5) = 19.

%e (End)

%e From _Gus Wiseman_, Oct 26 2018: (Start)

%e With offset 1, the a(1) = 1 through a(6) = 19 partitions of 2*n whose greatest part is > n:

%e (2) (4) (6) (8) (A) (C)

%e (31) (42) (53) (64) (75)

%e (51) (62) (73) (84)

%e (411) (71) (82) (93)

%e (521) (91) (A2)

%e (611) (622) (B1)

%e (5111) (631) (732)

%e (721) (741)

%e (811) (822)

%e (6211) (831)

%e (7111) (921)

%e (61111) (A11)

%e (7221)

%e (7311)

%e (8211)

%e (9111)

%e (72111)

%e (81111)

%e (711111)

%e With offset 1, the a(1) = 1 through a(6) = 19 partitions of 2*n whose number of parts is > n:

%e (11) (211) (2211) (22211) (222211) (2222211)

%e (1111) (3111) (32111) (322111) (3222111)

%e (21111) (41111) (331111) (3321111)

%e (111111) (221111) (421111) (4221111)

%e (311111) (511111) (4311111)

%e (2111111) (2221111) (5211111)

%e (11111111) (3211111) (6111111)

%e (4111111) (22221111)

%e (22111111) (32211111)

%e (31111111) (33111111)

%e (211111111) (42111111)

%e (1111111111) (51111111)

%e (222111111)

%e (321111111)

%e (411111111)

%e (2211111111)

%e (3111111111)

%e (21111111111)

%e (111111111111)

%e (End)

%e From _Joerg Arndt_, Jan 01 2024: (Start)

%e The a(5) = 19 multiset partitions of the multiset {1^5, 2^1} are:

%e 1: {{1, 1, 1, 1, 1, 2}}

%e 2: {{1, 1, 1, 1, 1}, {2}}

%e 3: {{1, 1, 1, 1, 2}, {1}}

%e 4: {{1, 1, 1, 1}, {1, 2}}

%e 5: {{1, 1, 1, 1}, {1}, {2}}

%e 6: {{1, 1, 1, 2}, {1, 1}}

%e 7: {{1, 1, 1, 2}, {1}, {1}}

%e 8: {{1, 1, 1}, {1, 1, 2}}

%e 9: {{1, 1, 1}, {1, 1}, {2}}

%e 10: {{1, 1, 1}, {1, 2}, {1}}

%e 11: {{1, 1, 1}, {1}, {1}, {2}}

%e 12: {{1, 1, 2}, {1, 1}, {1}}

%e 13: {{1, 1, 2}, {1}, {1}, {1}}

%e 14: {{1, 1}, {1, 1}, {1, 2}}

%e 15: {{1, 1}, {1, 1}, {1}, {2}}

%e 16: {{1, 1}, {1, 2}, {1}, {1}}

%e 17: {{1, 1}, {1}, {1}, {1}, {2}}

%e 18: {{1, 2}, {1}, {1}, {1}, {1}}

%e 19: {{1}, {1}, {1}, {1}, {1}, {2}}

%e (End)

%p with(combinat): a:=n->add(numbpart(j),j=0..n): seq(a(n), n=0..44); # _Zerinvary Lajos_, Aug 26 2008

%t CoefficientList[ Series[1/(1 - x)*Product[1/(1 - x^k), {k, 75}], {x, 0, 45}], x] (* _Robert G. Wilson v_, Jul 13 2004 *)

%t Table[ Count[ Flatten@ IntegerPartitions@ n, 1], {n, 45}] (* _Robert G. Wilson v_, Aug 06 2008 *)

%t Join[{1}, Accumulate[PartitionsP[Range[50]]]+1] (* _Harvey P. Dale, Mar 12 2013 *)

%t a[ n_] := SeriesCoefficient[ 1 / (1 - x) / QPochhammer[ x], {x, 0, n}]; (* _Michael Somos_, Nov 09 2013 *)

%t Accumulate[PartitionsP[Range[0,49]]] (* _George Beck_, Oct 23 2014; typo fixed by _Virgile Andreani_, Jul 10 2016 *)

%o (PARI) {a(n) = if( n<0, 0, polcoeff( 1 / prod(m=1, n, 1 - x^m, 1 + x * O(x^n)) / (1 - x), n))}; /* _Michael Somos_, Nov 08 2002 */

%o (PARI) x='x+O('x^66); Vec(1/((1-x)*eta(x))) /* _Joerg Arndt_, May 15 2011 */

%o (PARI) a(n) = sum(k=0, n, numbpart(k)); \\ _Michel Marcus_, Sep 16 2016

%o (Haskell)

%o a000070 = p a028310_list where

%o p _ 0 = 1

%o p ks'@(k:ks) m = if m < k then 0 else p ks' (m - k) + p ks m

%o -- _Reinhard Zumkeller_, Nov 06 2012

%o (Sage)

%o def A000070_list(leng):

%o p = [number_of_partitions(n) for n in range(leng)]

%o return [add(p[:k+1]) for k in range(leng)]

%o A000070_list(45) # _Peter Luschny_, Sep 15 2014

%o (GAP) List([0..45],n->Sum([0..n],k->NrPartitions(k))); # _Muniru A Asiru_, Jul 25 2018

%o (Python)

%o from itertools import accumulate

%o def A000070iter(n):

%o L = [0]*n; L[0] = 1

%o def numpart(n):

%o S = 0; J = n-1; k = 2

%o while 0 <= J:

%o T = L[J]

%o S = S+T if (k//2)%2 else S-T

%o J -= k if (k)%2 else k//2

%o k += 1

%o return S

%o for j in range(1, n): L[j] = numpart(j)

%o return accumulate(L)

%o print(list(A000070iter(100))) # _Peter Luschny_, Aug 30 2019

%o (Python) # Using function A365676Row. Compare also A365675.

%o from itertools import accumulate

%o def A000070List(size: int) -> list[int]:

%o return [sum(accumulate(reversed(A365676Row(n)))) for n in range(size)]

%o print(A000070List(45)) # _Peter Luschny_, Sep 16 2023

%Y A diagonal of A066633.

%Y Also second column of A126442. - _George Beck_, May 07 2011

%Y Row sums of triangle A092905.

%Y Also row sums of triangle A261555. - _Omar E. Pol_, Sep 14 2016

%Y Also row sums of triangle A278427. - _John P. McSorley_, Nov 25 2016

%Y Column k=2 of A292508.

%Y Cf. A014153, A024786, A026794, A026905, A058884, A093694, A133735, A137633, A010815, A027293, A035363, A028310, A000712, A000990.

%Y Cf. A000569, A025065, A036469, A096373, A147878, A209816, A320891, A320924.

%K nonn,easy,nice

%O 0,2

%A _N. J. A. Sloane_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 26 20:10 EDT 2024. Contains 372004 sequences. (Running on oeis4.)