[go: up one dir, main page]

login
Search: a003056 -id:a003056
     Sort: relevance | references | number | modified | created      Format: long | short | data
Expansion of Product_{m >= 1} (1 + x^m); number of partitions of n into distinct parts; number of partitions of n into odd parts.
(Formerly M0281 N0100)
+0
1521
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,4
COMMENTS
Partitions into distinct parts are sometimes called "strict partitions".
The number of different ways to run up a staircase with m steps, taking steps of odd sizes (or taking steps of distinct sizes), where the order is not relevant and there is no other restriction on the number or the size of each step taken is the coefficient of x^m.
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]
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 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).
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..5000 (first 2000 terms from N. J. A. Sloane)
Joerg Arndt, Matters Computational (The Fxtbook), pp. 348-350.
M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972 [alternative scanned copy], p. 836.
Francesca Aicardi, Matricial formulae for partitions, Functional Analysis and Other Mathematics, Vol. 3, No. 2 (2011), pp. 127-133; arXiv preprint, arXiv:0806.1273 [math.NT], 2008.
George E. Andrews, Euler's "De Partitio Numerorum", Bull. Amer. Math. Soc., 44 (No. 4, 2007), 561-573.
George E. Andrews, The Bhargava-Adiga Summation and Partitions, 2016. See page 4 equation (2.2).
Brennan Benfield and Arindam Roy, Log-concavity And The Multiplicative Properties of Restricted Partition Functions, arXiv:2404.03153 [math.NT], 2024.
Andreas B. G. Blobel, An Asymptotic Form of the Generating Function Prod_{k=1,oo} (1+x^k/k), arXiv:1904.07808 [math.CO], 2019.
Alexander Bors, Michael Giudici, and Cheryl E. Praeger, Documentation for the GAP code file OrbOrd.txt, arXiv:1910.12570 [math.GR], 2019.
Andrés Eduardo Caicedo and Brittany Shelton, Of puzzles and partitions: Introducing Partiti, Mathematics Magazine, Vol. 91, No. 1 (2018), pp. 20-23; arXiv preprint, arXiv:1710.04495 [math.HO], 2017.
Huantian Cao, AutoGF: An Automated System to Calculate Coefficients of Generating Functions, thesis, 2002. [Local copy, with permission]
H. B. C. Darling, Collected Papers of Ramanujan, Table for q(n); n=1 through 100.
Alejandro Erickson and Mark Schurch, Monomer-dimer tatami tilings of square regions, Journal of Discrete Algorithms, Vol. 16 (2012), pp. 258-269; arXiv preprint, arXiv:1110.5103 [math.CO], 2011.
John A. Ewell, Partition recurrences, J. Comb. Theory A, Vol. 14, 125-127, 1973.
Philippe Flajolet and Robert Sedgewick, Analytic Combinatorics, Cambridge University Press, 2009; see pages 48 and 499.
Evangelos Georgiadis, Computing Partition Numbers q(n), Technical Report, February (2009).
Cristiano Husu, The butterfly sequence: the second difference sequence of the numbers of integer partitions with distinct parts, Journal of Number Theory, Vol. 193 (2018), pp. 171-188; arXiv preprint, arXiv:1804.09883 [math.NT], 2018.
Vaclav Kotesovec, Getting wrong limit with Bessel, Mathematica Stack Exchange, Nov 09 2016.
Alain Lascoux, Sylvester's bijection between strict and odd partitions, Discrete Math., Vol. 277, No. 1-3 (2004), pp. 275-278.
Jeremy Lovejoy, The number of partitions into distinct parts modulo powers of 5, Bulletin of the London Mathematical Society, Vol. 35, No. 1 (2003), pp. 41-46; alternative link.
James Mc Laughlin, Andrew V. Sills, and Peter Zimmer, Rogers-Ramanujan-Slater Type Identities, Electronic J. Combinatorics, DS15, 1-59, May 31, 2008; see also arXiv version, arXiv:1901.00946 [math.NT], 2019.
Günter Meinardus, Über Partitionen mit Differenzenbedingungen, Mathematische Zeitschrift (1954/55), Volume 61, page 289-302.
Mircea Merca, Combinatorial interpretations of a recent convolution for the number of divisors of a positive integer, Journal of Number Theory, Volume 160, March 2016, Pages 60-75, function q(n).
Mircea Merca, The Lambert series factorization theorem, The Ramanujan Journal, Vol. 44, No. 2 (2017), pp. 417-435; alternative link.
István Mező, Several special values of Jacobi theta functions arXiv:1106.2703v3 [math.CA], 2011-2013.
Donald J. Newman, A Problem Seminar, pp. 18;93;102-3 Prob. 93 Springer-Verlag NY 1982.
Hieu D. Nguyen and Douglas Taggart, Mining the OEIS: Ten Experimental Conjectures, 2013. Mentions this sequence.
Kimeu Arphaxad Ngwava, Nick Gill, and Ian Short, Nilpotent covers of symmetric groups, arXiv:2005.13869 [math.GR], 2020.
Ed Sandifer, How Euler Did It, Philip Naude's problem.
Zhi-Wei Sun, A representation problem involving strict partition numbers, Question 444761 at MathOverflow, April 14, 2023.
Wikipedia, Glaisher's Theorem.
Mingjia Yang and Doron Zeilberger, Systematic Counting of Restricted Partitions, arXiv:1910.08989 [math.CO], 2019.
Michael P. Zaletel and Roger S. K. Mong, Exact matrix product states for quantum Hall wave functions, Physical Review B, Vol. 86, No. 24 (2012), 245305; arXiv preprint, arXiv:1208.4862 [cond-mat.str-el], 2012. - From N. J. A. Sloane, Dec 25 2012
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
G.f.: 1/2 (-1; x)_{inf} where (a; q)_k is the q-Pochhammer symbol. - Vladimir Reshetnikov, Apr 24 2013
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
EXAMPLE
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)
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
# Alternatively:
simplify(expand(QDifferenceEquations:-QPochhammer(-1, x, 99)/2, x)):
seq(coeff(%, x, n), n=0..55); # Peter Luschny, Nov 17 2016
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 *)
PROG
(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
(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
(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
(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 n<m then 0 else if n=m then h(n) else sum(h(k)*S(n-k, k), k, m, n/2)+h(n);
makelist(S(n, 1), n, 0, 27); /* Vladimir Kruchinin, Sep 07 2014 */
(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
(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
(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
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.
KEYWORD
nonn,core,easy,nice,changed
STATUS
approved
Triangle read by rows: T(n,k), n>=1, k>=1, in which column k lists the odd numbers multiplied by -1, interleaved with k-1 zeros, but T(n,1) = 1 and the first element of column k is in row k(k+1)/2.
+0
2
1, 1, 1, -1, 1, 0, 1, -3, 1, 0, -1, 1, -5, 0, 1, 0, 0, 1, -7, -3, 1, 0, 0, -1, 1, -9, 0, 0, 1, 0, -5, 0, 1, -11, 0, 0, 1, 0, 0, -3, 1, -13, -7, 0, -1, 1, 0, 0, 0, 0, 1, -15, 0, 0, 0, 1, 0, -9, -5, 0, 1, -17, 0, 0, 0, 1, 0, 0, 0, -3, 1, -19, -11, 0, 0, -1, 1, 0, 0, -7, 0, 0, 1, -21, 0, 0, 0, 0, 1, 0, -13, 0, 0, 0
OFFSET
1,8
COMMENTS
Gives an identity for the deficiency of n. Alternating sum of row n equals the deficiency of n, i.e., Sum_{k=1..A003056(n)} (-1)^(k-1)*T(n,k) = A033879(n).
Row n has length A003056(n) hence the first element of column k is in row A000217(k).
The number of nonzero elements of row n is A001227(n).
If T(n,k) is the second nonzero term in column k then T(n+1,k+1) = -1 is the first element of column k+1.
FORMULA
T(n,k) = -1*A231345(n,k).
T(n,k) = -1*A196020(n,k), if k >= 2.
EXAMPLE
Triangle begins:
1;
1;
1, -1;
1, 0;
1, -3;
1, 0, -1;
1, -5, 0;
1, 0, 0;
1, -7, -3;
1, 0, 0, -1;
1, -9, 0, 0;
1, 0, -5, 0;
1, -11, 0, 0;
1, 0, 0, -3;
1, -13, -7, 0, -1;
1, 0, 0, 0, 0;
1, -15, 0, 0, 0;
1, 0, -9, -5, 0;
1, -17, 0, 0, 0;
1, 0, 0, 0, -3;
1, -19, -11, 0, 0, -1;
1, 0, 0, -7, 0, 0;
1, -21, 0, 0, 0, 0;
1, 0, -13, 0, 0, 0;
1, -23, 0, 0, -5, 0;
1, 0 0, -9, 0, 0;
1, -25, -15, 0, 0, -3;
1, 0, 0, 0, 0, 0, -1;
...
For n = 24 the divisors of 24 are 1, 2, 3, 4, 6, 8, 12, 24 so the deficiency of 24 is 24 - 12 - 8 - 6 - 4 - 3 - 2 - 1 = -12. On the other hand the 24th row of triangle is 1, 0, -13, 0, 0, 0, and the alternating row sum is 1 - 0 +(-13) - 0 + 0 - 0 = -12, equaling the deficiency of 24; A033879(24) = -12, so 24 is an abundant number (A005101).
For n = 27 the divisors of 27 are 1, 3, 9, 27 so the deficiency of 27 is 27 - 9 - 3 - 1 = 14. On the other hand the 27th row of triangle is 1, -25, -15, 0, 0, -3, and the alternating row sum is 1 -(-25) +(-15) - 0 + 0 -(-3) = 14, equalling the deficiency of 27; A033879(27) = 14, so 27 is a deficient number (A005100).
For n = 28 the divisors of 28 are 1, 2, 4, 7, 14, 28 so the deficiency of 28 is 28 - 14 - 7 - 4 - 2 - 1 = 0. On the other hand the 28th row of triangle is 1, 0, 0, 0, 0, 0, -1, and the alternating row sum is 1 - 0 + 0 - 0 + 0 - 0 +(-1) = 0, equaling the deficiency of 28; A033879(28) = 0, so 28 is a perfect number (A000396).
CROSSREFS
KEYWORD
sign,tabf,changed
AUTHOR
Omar E. Pol, Apr 19 2016
STATUS
approved
Triangle read by rows: T(n,k), n>=1, k>=1, in which column k lists the numbers A016945 interleaved with k-1 zeros, and the first element of column k is in row k(k+1)/2.
+0
4
3, 9, 15, 3, 21, 0, 27, 9, 33, 0, 3, 39, 15, 0, 45, 0, 0, 51, 21, 9, 57, 0, 0, 3, 63, 27, 0, 0, 69, 0, 15, 0, 75, 33, 0, 0, 81, 0, 0, 9, 87, 39, 21, 0, 3, 93, 0, 0, 0, 0, 99, 45, 0, 0, 0, 105, 0, 27, 15, 0, 111, 51, 0, 0, 0, 117, 0, 0, 0, 9, 123, 57, 33, 0, 0, 3, 129, 0, 0, 21, 0, 0, 135, 63, 0, 0, 0, 0, 141, 0, 39, 0, 0, 0
OFFSET
1,1
COMMENTS
Alternating sum of row n equals 3 times sigma(n), i.e., Sum_{k=1..A003056(n)} (-1)^(k-1)*T(n,k) = 3*A000203(n) = A272027(n).
Row n has length A003056(n) hence the first element of column k is in row A000217(k).
The number of positive terms in row n is A001227(n).
If T(n,k) = 9 then T(n+1,k+1) = 3 is the first element of the column k+1.
For more information see A196020.
FORMULA
T(n,k) = 3*A196020(n,k) = A196020(n,k) + A236106(n,k).
EXAMPLE
Triangle begins:
3;
9;
15, 3;
21, 0;
27, 9;
33, 0, 3;
39, 15, 0;
45, 0, 0;
51, 21, 9;
57, 0, 0, 3;
63, 27, 0, 0;
69, 0, 15, 0;
75, 33, 0, 0;
81, 0, 0, 9;
87, 39, 21, 0, 3;
93, 0, 0, 0, 0;
99, 45, 0, 0, 0;
105, 0, 27, 15, 0;
111, 51, 0, 0, 0;
117, 0, 0, 0, 9;
123, 57, 33, 0, 0, 3;
129, 0, 0, 21, 0, 0;
135, 63, 0, 0, 0, 0;
141, 0, 39, 0, 0, 0;
...
For n = 9 the divisors of 9 are 1, 3, 9, therefore the sum of the divisors of 9 is 1 + 3 + 9 = 13 and 3*13 = 39. On the other hand the 9th row of triangle is 51, 21, 9, therefore the alternating row sum is 51 - 21 + 9 = 39, equaling 3 times sigma(9).
KEYWORD
nonn,tabf,changed
AUTHOR
Omar E. Pol, Apr 18 2016
STATUS
approved
Numbers m^2 for which the center part (containing the diagonal) of its symmetric representation of sigma, SRS(m^2), has width 1 and area m.
+0
1
1, 9, 25, 49, 81, 121, 169, 289, 361, 441, 529, 625, 729, 841, 961, 1089, 1369, 1521, 1681, 1849, 2209, 2401, 2601, 2809, 3025, 3249, 3481, 3721, 4225, 4489, 4761, 5041, 5329, 6241, 6561, 6889, 7225, 7569, 7921, 8649, 9025, 9409, 10201, 10609, 11449, 11881, 12321, 12769, 13225, 14161, 14641, 15129, 15625
OFFSET
1,2
COMMENTS
Since for numbers m^2 in the sequence the width at the diagonal of SRS(m^2) is 1, the area m of its center part is odd so that this sequence is a proper subsequence of A016754 and since SRS(m^2) has an odd number of parts it is a proper subsequence of A319529. The smallest odd square not in this sequence is 225 = 15^2. SRS(225) is {113, 177, 113}, its center part has maximum width 2, its width at the diagonal is 1.
The k+1 parts of SRS(p^(2k)), p an odd prime and k >= 0, through the diagonal including the center part have areas (p^(2k-i) + p^i)/2 for 0 <= i <= k. They form a strictly decreasing sequence. Since p^(2k) has 2k+1 divisors and SRS(p^(2k)) has 2k+1 parts, all of width 1 (A357581), the even powers of odd primes form a proper subsequence of A244579. For the subsequence of squares of odd primes p, SRS(p^2) consists of the 3 parts { (p^2 + 1)/2, p, (p^2 + 1)/2 } see A001248, A247687 and A357581.
The areas of the parts of SRS(m^2) need not be in descending order through the diagonal as a(112) = 275^2 = 75625 with SRS(75625) = (37813, 7565, 3443, 1525, 715, 738, 275, 738, 715, 1525, 3443, 7565, 37813) demonstrates.
An equivalent description of the sequence is: The center part of SRS(m^2) has width 1, m is odd, and A249223(m^2, m-1) = 0.
Conjectures (true for all a(n) <= 10^8):
(1) The central part of SRS(a(n)) is the minimum of all parts of SRS(a(n)), 1 <= n.
(2) The terms in this sequence are the squares of the terms in A244579.
EXAMPLE
The center part of SRS(a(3)) = SRS(25) has area 5, all 3 parts have width 1, and 25 with 3 divisors also belongs to A244579.
The center part of SRS(a(7)) = SRS(169) has area 13, all 3 parts have width 1, and 169 with 3 divisors also belongs to A244579.
The center part of SRS(a(10)) = SRS(441) has area 21 and width 1, but the maximum width of SRS(441) is 2. Number 441 has 9 divisors and SRS(441) has 7 parts while 21 has 4 divisors and SRS(21) has 4 parts so that 21 is in A244579 while 441 is not.
MATHEMATICA
(* t237591 and partsSRS compute rows in A237270 and A237591, respectively *)
(* t249223 and widthPattern are also defined in A376829 *)
row[n_] := Floor[(Sqrt[8 n+1]-1)/2]
t237591[n_] := Map[Ceiling[(n+1)/#-(#+1)/2]-Ceiling[(n+1)/(#+1)-(#+2)/2]&, Range[row[n]]]
partsSRS[n_] := Module[{widths=t249223[n], legs=t237591[n], parts, srs}, parts=widths legs; srs=Map[Apply[Plus, #]&, Select[SplitBy[Join[parts, Reverse[parts]], #!=0&], First[#]!=0&]]; srs[[Ceiling[Length[srs]/2]]]-=Last[widths]; srs]
t249223[n_] := FoldList[#1+(-1)^(#2+1)KroneckerDelta[Mod[n-#2 (#2+1)/2, #2]]&, 1, Range[2, row[n]]]
widthPattern[n_] := Map[First, Split[Join[t249223[n], Reverse[t249223[n]]]]]
centerQ[n_] := Module[{pS=partsSRS[n]}, Sqrt[n]==pS[[(Length[pS]+1)/2]]]/; OddQ[n]
widthQ[n_] := Module[{wP=SplitBy[widthPattern[n], #!=0&]}, wP[[(Length[wP]+1)/2]]]=={1}/; OddQ[n]
a377654[m_, n_] := Select[Map[#^2&, Range[m, n, 2]], centerQ[#]&&widthQ[#]&]/; OddQ[m]
a377654[1, 125]
CROSSREFS
KEYWORD
nonn,new
AUTHOR
Hartmut F. W. Hoft, Nov 03 2024
STATUS
approved
Triangle read by rows T(n,k) in which column k lists the partial sums of the k-th column of triangle A236104.
+0
8
1, 5, 14, 1, 30, 2, 55, 6, 91, 10, 1, 140, 19, 2, 204, 28, 3, 285, 44, 7, 385, 60, 11, 1, 506, 85, 15, 2, 650, 110, 24, 3, 819, 146, 33, 4, 1015, 182, 42, 8, 1240, 231, 58, 12, 1, 1496, 280, 74, 16, 2, 1785, 344, 90, 20, 3, 2109, 408, 115, 29, 4, 2470, 489, 140, 38, 5, 2870, 570, 165, 47, 9, 3311, 670, 201, 56, 13, 1
OFFSET
1,2
COMMENTS
Alternating sum of row n equals A175254(n), i.e., Sum_{k=1..A003056(n)} (-1)^(k-1)*T(n,k) = A175254(n), which is also the volume (or the total number of units cubes) in the first n levels of the stepped pyramid described in A245092.
Row n has length A003056(n) hence the first element of column k is in row A000217(k).
EXAMPLE
Triangle begins:
1;
5;
14, 1;
30, 2;
55, 6;
91, 10, 1;
140, 19, 2;
204, 28, 3;
285, 44, 7;
385, 60, 11, 1;
506, 85, 15, 2;
650, 110, 24, 3;
819, 146, 33, 4;
1015, 182, 42, 8;
1240, 231, 58, 12, 1;
1496, 280, 74, 16, 2;
1785, 344, 90, 20, 3;
2109, 408, 115, 29, 4;
2470, 489, 140, 38, 5;
2870, 570, 165, 47, 9;
3311, 670, 201, 56, 13, 1;
3795, 770, 237, 72, 17, 2;
4324, 891, 273, 88, 21, 3;
4900, 1012, 322, 104, 25, 4;
...
For n = 6 we have that A175254(6) = [1] + [1 + 3] + [1 + 3 + 4] + [1 + 3 + 4 + 7] + [1 + 3 + 4 + 7 + 6] + [1 + 3 + 4 + 7 + 6 + 12] = 1 + 4 + 8 + 15 + 21 + 33 = 82. On the other hand the alternating sum of the 6th row of the triangle is 91 - 10 + 1 = 82, equaling A175254(6).
CROSSREFS
Column 1 gives A000330, n >= 1. Column 2 is A005993. It appears that column 3 is A092353.
KEYWORD
nonn,tabf,changed
AUTHOR
Omar E. Pol, Nov 03 2015
STATUS
approved
Irregular triangle read by rows in which row n lists the elements of row n of A249223 and then the elements of the same row in reverse order.
+0
31
1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 2, 2, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 2, 2, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
OFFSET
1,19
COMMENTS
The n-th row of the triangle has length 2*A003056(n).
This sequence extends A249223 in the same manner as A237593 extends A237591.
The entries in the n-th row of the triangle are the widths of the regions between the (n-1)-st and n-th Dyck paths for the symmetric representation of sigma(n) with each column representing the corresponding leg of the n-th path.
LINKS
N. J. A. Sloane, Table of n, a(n) for n = 1..3200 [First 150 rows, based on G. C. Greubel's b-file for A249223]
FORMULA
T(n, k) = T(n, 2*A003056(n) + 1 - k) = A249223(n, k), for 1 <= n and 1 <= k <= A003056(n).
EXAMPLE
n\k 1 2 3 4 5 6 7 8 9 10
1 1 1
2 1 1
3 1 0 0 1
4 1 1 1 1
5 1 0 0 1
6 1 1 2 2 1 1
7 1 0 0 0 0 1
8 1 1 1 1 1 1
9 1 0 1 1 0 1
10 1 1 1 0 0 1 1 1
11 1 0 0 0 0 0 0 1
12 1 1 2 2 2 2 1 1
13 1 0 0 0 0 0 0 1
14 1 1 1 0 0 1 1 1
15 1 0 1 1 2 2 1 1 0 1
16 1 1 1 1 1 1 1 1 1 1
17 1 0 0 0 0 0 0 0 0 1
18 1 1 2 1 1 1 1 2 1 1
19 1 0 0 0 0 0 0 0 0 1
20 1 1 1 1 2 2 1 1 1 1
...
The triangle shows that the region between a Dyck path for n and n-1 has width 1 if n is a power of 2. For n a prime the region is a horizontal rectangle of width (height) 1 and the vertical rectangle of width 1 which is its reflection. The Dyck paths and regions are shown below for n = 1..5 (see the A237593 example for n = 1..28):
_ _ _
5 |_ _ _|
4 |_ _ |_ _
3 |_ _|_ | |
2 |_ | | | |
1 |_|_|_|_|_|
MATHEMATICA
(* functions a237048[ ] and row[ ] are defined in A237048 *)
f[n_] :=Drop[FoldList[Plus, 0, Map[(-1)^(#+1)&, Range[row[n]]] a237048[n]], 1]
a262045[n_]:=Join[f[n], Reverse[f[n]]]
Flatten[Map[a262045, Range[16]]](* data *)
KEYWORD
nonn,tabf,changed
AUTHOR
Hartmut F. W. Hoft, Sep 09 2015
STATUS
approved
Triangle read by rows: T(n,k), n>=1, k>=1, in which column k lists the numbers of A210843 multiplied by A000330(k), and the first element of column k is in row A000217(k).
+0
2
1, 4, 13, 5, 35, 20, 86, 65, 194, 175, 14, 415, 430, 56, 844, 970, 182, 1654, 2075, 490, 3133, 4220, 1204, 30, 5773, 8270, 2716, 120, 10372, 15665, 5810, 390, 18240, 28865, 11816, 1050, 31449, 51860, 23156, 2580, 53292, 91200, 43862, 5820, 55, 88873, 157245, 80822, 12450, 220, 146095, 266460, 145208, 25320, 715
OFFSET
1,2
COMMENTS
Conjecture: gives an identity for the sum of all divisors of all positive integers <= n. Alternating sum of row n equals A024916(n), i.e., Sum_{k=1..A003056(n)} (-1)^(k-1)*T(n,k) = A024916(n).
Row n has length A003056(n) hence the first element of column k is in row A000217(k).
Column 1 is A210843.
Column k lists the partial sums of the k-th column of triangle A252117 which gives an identity for sigma.
The first element of column k is A000330(k).
The second element of column k is A002492(k).
EXAMPLE
Triangle begins:
1;
4;
13, 5;
35, 20;
86, 65;
194, 175, 14;
415, 430, 56;
844, 970, 182;
1654, 2075, 490;
3133, 4220, 1204, 30;
5773, 8270, 2716, 120;
10372, 15665, 5810, 390;
18240, 28865, 11816, 1050;
31449, 51860, 23156, 2580;
53292, 91200, 43862, 5820, 55;
88873, 157245, 80822, 12450, 220;
146095, 266460, 145208, 25320, 715;
236977, 444365, 255360, 49620, 1925;
379746, 730475, 440286, 93990, 4730;
601656, 1184885, 746088, 173190, 10670;
943305, 1898730, 1244222, 311160, 22825, 91;
...
For n = 6 the sum of all divisors of all positive integers <= 6 is [1] + [1+2] + [1+3] + [1+2+4] + [1+5] + [1+2+3+6] = 1 + 3 + 4 + 7 + 6 + 12 = 33. On the other hand the 6th row of triangle is 194, 175, 14, so the alternating row sum is 194 - 175 + 14 = 33, equaling the sum of all divisors of all positive integers <= 6.
KEYWORD
nonn,tabf
AUTHOR
Omar E. Pol, Dec 14 2014
STATUS
approved
Table T(n,k) = |n-k| read by antidiagonals (n >= 0, k >= 0).
+0
24
0, 1, 1, 2, 0, 2, 3, 1, 1, 3, 4, 2, 0, 2, 4, 5, 3, 1, 1, 3, 5, 6, 4, 2, 0, 2, 4, 6, 7, 5, 3, 1, 1, 3, 5, 7, 8, 6, 4, 2, 0, 2, 4, 6, 8, 9, 7, 5, 3, 1, 1, 3, 5, 7, 9, 10, 8, 6, 4, 2, 0, 2, 4, 6, 8, 10, 11, 9, 7, 5, 3, 1, 1, 3, 5, 7, 9, 11, 12, 10, 8, 6, 4, 2, 0, 2, 4, 6, 8, 10, 12
OFFSET
0,4
COMMENTS
Commutative non-associative operator with identity 0. T(nx,kx) = x T(n,k). A multiplicative analog is A089913. - Marc LeBrun, Nov 14 2003
For the characteristic polynomial of the n X n matrix M_n with entries M_n(i, j) = |i-j| see A203993. - Wolfdieter Lang, Feb 04 2018
For the determinant of the n X n matrix M_n with entries M_n(i, j) = |i-j| see A085750. - Bernard Schott, May 13 2020
a(n) = 0 iff n = 4 times triangular number (A046092). - Bernard Schott, May 13 2020
FORMULA
G.f.: (x + y - 4xy + x^2y + xy^2)/((1-x)^2 (1-y)^2) (1-xy)) = (x/(1-x)^2 + y/(1-y)^2)/(1-xy). T(n,0) = T(0,n) = n; T(n+1,k+1) = T(n,k). - Franklin T. Adams-Watters, Feb 06 2006
a(n) = |A002260(n+1)-A004736(n+1)| or a(n) = |((n+1)-t(t+1)/2) - (t*t+3*t+4)/2-(n+1))| where t=floor[(-1+sqrt(8*(n+1)-7))/2]. - Boris Putievskiy, Dec 24 2012; corrected by Altug Alkan, Sep 30 2015
From Robert Israel, Sep 30 2015: (Start)
If b(n) = a(n+1) - 2*a(n) + a(n-1), then for n >= 3 we have
b(n) = -1 if n = (j^2+5j+4)/2 for some integer j >= 1
b(n) = -3 if n = (j^2+5j+6)/2 for some integer j >= 0
b(n) = 4 if n = 2j^2 + 6j + 4 for some integer j >= 0
b(n) = 2 if n = 2j^2 + 8j + 7 or 2j^2 + 8j + 8 for some integer j >= 0
b(n) = 0 otherwise. (End)
Triangle t(n,k) = max(k, n-k) - min(k, n-k). - Peter Luschny, Jan 26 2018
Triangle t(n, k) = |n - 2*k| for n >= 0, k = 0..n. See the Maple and Mathematica programs. Hence t(n, k)= t(n, n-k). - Wolfdieter Lang, Feb 04 2018
a(n) = |t^2 - 2*n - 1|, where t = floor(sqrt(2*n+1) + 1/2). - Ridouane Oudra, Jun 07 2019; Dec 11 2020
As a rectangle, T(n,k) = |n-k| = max(n,k) - min(n,k). - Clark Kimberling, May 11 2020
EXAMPLE
Displayed as a triangle t(n, k):
n\k 0 1 2 3 4 5 6 7 8 9 10 ...
0: 0
1: 1 1
2: 2 0 2
3: 3 1 1 3
4: 4 2 0 2 4
5: 5 3 1 1 3 5
6: 6 4 2 0 2 4 6
7: 7 5 3 1 1 3 5 7
8: 8 6 4 2 0 2 4 6 8
9: 9 7 5 3 1 1 3 5 7 9
10: 10 8 6 4 2 0 2 4 6 8 10
... reformatted by Wolfdieter Lang, Feb 04 2018
Displayed as a table:
0 1 2 3 4 5 6 ...
1 0 1 2 3 4 5 ...
2 1 0 1 2 3 4 ...
3 2 1 0 1 2 3 ...
4 3 2 1 0 1 2 ...
5 4 3 2 1 0 1 ...
6 5 4 3 2 1 0 ...
...
MAPLE
seq(seq(abs(n-2*k), k=0..n), n=0..12); # Robert Israel, Sep 30 2015
MATHEMATICA
Table[Abs[(n-k) -k], {n, 0, 12}, {k, 0, n}]//Flatten (* Michael De Vlieger, Sep 29 2015 *)
Table[Join[Range[n, 0, -2], Range[If[EvenQ[n], 2, 1], n, 2]], {n, 0, 12}]//Flatten (* Harvey P. Dale, Sep 18 2023 *)
PROG
(PARI) a(n) = abs(2*(n+1)-binomial((sqrtint(8*(n+1))+1)\2, 2)-(binomial(1+floor(1/2 + sqrt(2*(n+1))), 2))-1);
vector(100, n , a(n-1)) \\ Altug Alkan, Sep 29 2015
(PARI) {t(n, k) = abs(n-2*k)}; \\ G. C. Greubel, Jun 07 2019
(GAP) a := Flat(List([0..12], n->List([0..n], k->Maximum(k, n-k)-Minimum(k, n-k)))); # Muniru A Asiru, Jan 26 2018
(Magma) [[Abs(n-2*k): k in [0..n]]: n in [0..12]]; // G. C. Greubel, Jun 07 2019
(Sage) [[abs(n-2*k) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Jun 07 2019
(Python)
from math import isqrt
def A049581(n): return abs((k:=n+1<<1)-((m:=isqrt(k))+(k>m*(m+1)))**2-1) # Chai Wah Wu, Nov 09 2024
CROSSREFS
Cf. A089913. Apart from signs, same as A114327. A203993.
KEYWORD
nonn,tabl,easy,nice
STATUS
approved
Table T(n,m) = n - m read by upwards antidiagonals.
+0
12
0, 1, -1, 2, 0, -2, 3, 1, -1, -3, 4, 2, 0, -2, -4, 5, 3, 1, -1, -3, -5, 6, 4, 2, 0, -2, -4, -6, 7, 5, 3, 1, -1, -3, -5, -7, 8, 6, 4, 2, 0, -2, -4, -6, -8, 9, 7, 5, 3, 1, -1, -3, -5, -7, -9, 10, 8, 6, 4, 2, 0, -2, -4, -6, -8, -10, 11, 9, 7, 5, 3, 1, -1, -3, -5, -7, -9, -11, 12, 10, 8, 6, 4, 2, 0, -2, -4, -6, -8, -10, -12
OFFSET
0,4
COMMENTS
From Clark Kimberling, May 31 2011: (Start)
If we arrange A000027 as an array with northwest corner
1 2 4 7 17 ...
3 5 8 12 18 ...
6 9 13 18 24 ...
10 14 19 25 32 ...
diagonals can be numbered as follows depending on their distance to the main diagonal:
Diag 0: 1, 5, 13, 25, ...
Diag 1: 2, 8, 18, 32, ...
Diag -1: 3, 9, 19, 33, ...,
then a(n) in the flattened array is the number of the diagonal that contains n+1. (End)
Construct the infinite-dimensional matrix representation of angular momentum operators (J_1,J_2,J_3) in Jordan-Schwinger form (cf. Harter, Klee, Schwinger). Triangle terms T(n,k) = T(2j,j-m) satisfy: (1/2) T(2j,j-m) = <j,m|J_3|j,m> = m. Matrix J_3 is diagonal, so this equality determines the only nonzero entries. - Bradley Klee, Jan 29 2016
For the characteristic polynomial of the n X n matrix M_n (Det(x*1_n - M_n)) with elements M_n(i, j) = i-j see the Michael Somos, Nov 14 2002, comment on A002415. - Wolfdieter Lang, Feb 05 2018
The entries of the n-th antidiagonal, T(n,1), T(n-1,2), ... , T(1,n), are the eigenvalues of the Hamming graph H(2,n-1) (or hypercube Q(n-1)). - Miquel A. Fiol, May 21 2024
LINKS
W. Harter, Principles of Symmetry, Dynamics, Spectroscopy, Wiley, 1993, Ch. 5, page 345-346.
B. Klee, Quantum Angular Momentum Matrices, Wolfram Demonstrations Project, 2016.
J. Schwinger, On Angular Momentum, Cambridge: Harvard University, Nuclear Development Associates, Inc., 1952.
FORMULA
G.f. for the table: Sum_{n, m>=0} T(n,m)*x^n*y^n = (x-y)/((1-x)^2*(1-y)^2).
E.g.f. for the table: Sum_{n, m>=0} T(n,m)x^n/n!*y^m/m! = (x-y)*e^{x+y}.
T(n,k) = A025581(n,k) - A002262(n,k).
a(n) = A004736(n) - A002260(n) or a(n) = (t*t+3*t+4)/2-n) - (n-t*(t+1)/2), where t=floor((-1+sqrt(8*n-7))/2). - Boris Putievskiy, Dec 24 2012
G.f. as sequence: -(1+x)/(1-x)^2 + (Sum_{j>=0} (2*j+1)*x^(j*(j+1)/2) / (1-x). The sum is related to Jacobi theta functions. - Robert Israel, Jan 29 2016
Triangle t(n, k) = n - 2*k, for n >= 0, k = 0..n. (see the Maple program). - Wolfdieter Lang, Feb 05 2018
EXAMPLE
From Wolfdieter Lang, Feb 05 2018: (Start)
The table T(n, m) begins:
n\m 0 1 2 3 4 5 ...
0: 0 -1 -2 -3 -4 -5 ...
1: 1 0 -1 -2 -3 -4 ...
2: 2 1 0 -1 -2 -3 ...
3: 3 2 1 0 -1 -2 ...
4: 4 3 2 1 0 -1 ...
5: 5 4 3 2 1 0 ...
...
The triangle t(n, k) begins:
n\k 0 1 2 3 4 5 6 7 8 9 10 ...
0: 0
1: 1 -1
2: 2 0 -2
3: 3 1 -1 -3
4: 4 2 0 -2 -4
5: 5 3 1 -1 -3 -5
6: 6 4 2 0 -2 -4 -6
7: 7 5 3 1 -1 -3 -5 -7
8: 8 6 4 2 0 -2 -4 -6 -8
9: 9 7 5 3 1 -1 -3 -5 -7 -9
10: 10 8 6 4 2 0 -2 -4 -6 -8 -10
... Reformatted and corrected. (End)
MAPLE
seq(seq(i-2*j, j=0..i), i=0..30); # Robert Israel, Jan 29 2016
MATHEMATICA
max = 12; a025581 = NestList[Prepend[#, First[#]+1]&, {0}, max]; a002262 = Table[Range[0, n], {n, 0, max}]; a114327 = a025581 - a002262 // Flatten (* Jean-François Alcover, Jan 04 2016 *)
Flatten[Table[-2 m, {j, 0, 10, 1/2}, {m, -j, j}]] (* Bradley Klee, Jan 29 2016 *)
PROG
(Haskell)
a114327 n k = a114327_tabl !! n !! k
a114327_row n = a114327_tabl !! n
a114327_tabl = zipWith (zipWith (-)) a025581_tabl a002262_tabl
-- Reinhard Zumkeller, Aug 09 2014
(PARI) T(n, m) = n-m \\ Charles R Greathouse IV, Feb 07 2017
(Python)
from math import isqrt
def A114327(n): return ((m:=isqrt(k:=n+1<<1))+(k>m*(m+1)))**2+1-k # Chai Wah Wu, Nov 09 2024
CROSSREFS
Apart from signs, same as A049581. Cf. A003056, A025581, A002262, A002260, A004736. J_1,J_2: A094053; J_1^2,J_2^2: A141387, A268759. A002415.
KEYWORD
easy,sign,tabl,nice
AUTHOR
EXTENSIONS
Formula improved by Reinhard Zumkeller, Aug 09 2014
STATUS
approved
Triangle read by rows: row n lists the first n positive integers in decreasing order.
+0
331
1, 2, 1, 3, 2, 1, 4, 3, 2, 1, 5, 4, 3, 2, 1, 6, 5, 4, 3, 2, 1, 7, 6, 5, 4, 3, 2, 1, 8, 7, 6, 5, 4, 3, 2, 1, 9, 8, 7, 6, 5, 4, 3, 2, 1, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1
OFFSET
1,2
COMMENTS
Old name: Triangle T(n,k) = n-k, n >= 1, 0 <= k < n. Fractal sequence formed by repeatedly appending strings m, m-1, ..., 2, 1.
The PARI functions t1 (this sequence), t2 (A002260) can be used to read a square array T(n,k) (n >= 1, k >= 1) by antidiagonals upwards: n -> T(t1(n), t2(n)). - Michael Somos, Aug 23 2002, edited by M. F. Hasler, Mar 31 2020
A004736 is the mirror of the self-fission of the polynomial sequence (q(n,x)) given by q(n,x) = x^n+ x^(n-1) + ... + x + 1. See A193842 for the definition of fission. - Clark Kimberling, Aug 07 2011
Seen as flattened list: a(A000217(n)) = 1; a(A000124(n)) = n and a(m) <> n for m < A000124(n). - Reinhard Zumkeller, Jul 22 2012
Sequence B is called a reverse reluctant sequence of sequence A, if B is triangle array read by rows: row number k lists first k elements of the sequence A in reverse order. Sequence A004736 is the reverse reluctant sequence of sequence 1,2,3,... (A000027). - Boris Putievskiy, Dec 13 2012
The row sums equal A000217(n). The alternating row sums equal A004526(n+1). The antidiagonal sums equal A002620(n+1) respectively A008805(n-1). - Johannes W. Meijer, Sep 28 2013
From Peter Bala, Jul 29 2014: (Start)
Riordan array (1/(1-x)^2,x). Call this array M and for k = 0,1,2,... define M(k) to be the lower unit triangular block array
/I_k 0\
\ 0 M/
having the k X k identity matrix I_k as the upper left block; in particular, M(0) = M. Then the infinite matrix product M(0)*M(1)*M(2)*... is equal to A078812. (End)
T(n, k) gives the number of subsets of [n] := {1, 2, ..., n} with k consecutive numbers (consecutive k-subsets of [n]). - Wolfdieter Lang, May 30 2018
a(n) gives the distance from (n-1) to the smallest triangular number > (n-1). - Ctibor O. Zizka, Apr 09 2020
To construct the sequence, start from 1,2,,3,,,4,,,,5,,,,,6... where there are n commas after each "n". Then fill the empty places by the sequence itself. - Benoit Cloitre, Aug 17 2021
T(n,k) is the number of cycles of length 2*(k+1) in the (n+1)-ladder graph. There are no cycles of odd length. - Mohammed Yaseen, Jan 14 2023
The first 77 entries are also the signature sequence of log(3)=A002391. Then the two sequences start to differ. - R. J. Mathar, May 27 2024
REFERENCES
H. S. M. Coxeter, Regular Polytopes, 3rd ed., Dover, NY, 1973, pp 159-162.
LINKS
Isabel Cação, Helmuth R. Malonek, Maria Irene Falcão, and Graça Tomaz, Combinatorial Identities Associated with a Multidimensional Polynomial Sequence, J. Int. Seq., Vol. 21 (2018), Article 18.7.4.
Isabel Cação, Helmuth R. Malonek, Maria Irene Falcão, and Graça Tomaz, Intrinsic Properties of a Non-Symmetric Number Triangle, J. Int. Seq., Vol. 26 (2023), Article 23.4.8.
Glen Joyce C. Dulatre, Jamilah V. Alarcon, Vhenedict M. Florida, and Daisy Ann A. Disu, On Fractal Sequences, DMMMSU-CAS Science Monitor (2016-2017) Vol. 15 No. 2, 109-113.
Clark Kimberling, Fractal sequences
Clark Kimberling, Numeration systems and fractal sequences, Acta Arithmetica 73 (1995) 103-117.
Boris Putievskiy, Transformations Integer Sequences And Pairing Functions arXiv:1212.2732 [math.CO], 2012.
Eric Weisstein's World of Mathematics, Ladder Graph
Eric Weisstein's World of Mathematics, Smarandache Sequences
FORMULA
a(n+1) = 1 + A025581(n).
a(n) = (2 - 2*n + round(sqrt(2*n)) + round(sqrt(2*n))^2)/2. - Brian Tenneson, Oct 11 2003
G.f.: 1 / ((1-x)^2 * (1-x*y)). - Ralf Stephan, Jan 23 2005
Recursion: e(n,k) = (e(n - 1, k)*e(n, k - 1) + 1)/e(n - 1, k - 1). - Roger L. Bagula, Mar 25 2009
a(n) = (t*t+3*t+4)/2-n, where t = floor((-1+sqrt(8*n-7))/2). - Boris Putievskiy, Dec 13 2012
From Johannes W. Meijer, Sep 28 2013: (Start)
T(n, k) = n - k + 1, n >= 1 and 1 <= k <= n.
T(n, k) = A002260(n+k-1, n-k+1). (End)
a(n) = A000217(A002024(n)) - n + 1. - Enrique Pérez Herrero, Aug 29 2016
EXAMPLE
The triangle T(n, k) starts:
n\k 1 2 3 4 5 6 7 8 9 10 11 12 ...
1: 1
2: 2 1
3: 3 2 1
4: 4 3 2 1
5: 5 4 3 2 1
6: 6 5 4 3 2 1
7: 7 6 5 4 3 2 1
8: 8 7 6 5 4 3 2 1
9: 9 8 7 6 5 4 3 2 1
10: 10 9 8 7 6 5 4 3 2 1
11: 11 10 9 8 7 6 5 4 3 2 1
12: 12 11 10 9 8 7 6 5 4 3 2 1
... Reformatted. - Wolfdieter Lang, Feb 04 2015
T(6, 3) = 4 because the four consecutive 3-subsets of [6] = {1, 2, ..., 6} are {1, 2, 3}, {2, 3, 4}, {3, 4, 5} and {4, 5, 6}. - Wolfdieter Lang, May 30 2018
MAPLE
A004736 := proc(n, m) n-m+1 ; end:
T := (n, k) -> n-k+1: seq(seq(T(n, k), k=1..n), n=1..13); # Johannes W. Meijer, Sep 28 2013
MATHEMATICA
Flatten[ Table[ Reverse[ Range[n]], {n, 12}]] (* Robert G. Wilson v, Apr 27 2004 *)
Table[Range[n, 1, -1], {n, 20}]//Flatten (* Harvey P. Dale, May 27 2020 *)
PROG
(PARI) {a(n) = 1 + binomial(1 + floor(1/2 + sqrt(2*n)), 2) - n}
(PARI) {t1(n) = binomial( floor(3/2 + sqrt(2*n)), 2) - n + 1} /* A004736 */
(PARI) {t2(n) = n - binomial( floor(1/2 + sqrt(2*n)), 2)} /* A002260 */
(PARI) apply( A004736(n)=1-n+(n=sqrtint(8*n)\/2)*(n+1)\2, [1..99]) \\ M. F. Hasler, Mar 31 2020
(Excel) =if(row()>=column(); row()-column()+1; "") [Mats Granvik, Jan 19 2009]
(Haskell)
a004736 n k = n - k + 1
a004736_row n = a004736_tabl !! (n-1)
a004736_tabl = map reverse a002260_tabl
-- Reinhard Zumkeller, Aug 04 2014, Jul 22 2012
(Python)
def agen(rows):
for n in range(1, rows+1): yield from range(n, 0, -1)
print([an for an in agen(13)]) # Michael S. Branicky, Aug 17 2021
(Python)
from math import comb, isqrt
def A004736(n): return comb((m:=isqrt(k:=n<<1))+(k>m*(m+1))+1, 2)+1-n # Chai Wah Wu, Nov 08 2024
CROSSREFS
Ordinal transform of A002260. See also A078812.
Cf. A141419 (partial sums per row).
Cf. A134546 (T * A051731, matrix product).
See A001511 for definition of ordinal transform.
Cf. A128174 (parity).
KEYWORD
nonn,easy,tabl,nice
AUTHOR
R. Muller
EXTENSIONS
New name from Omar E. Pol, Jul 15 2012
STATUS
approved

Search completed in 0.203 seconds