Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Search: a034008 -id:a034008
     Sort: relevance | references | number | modified | created      Format: long | short | data
Positive integers repeated.
+10
235
1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 30, 30, 31, 31, 32, 32, 33, 33, 34, 34, 35, 35, 36, 36, 37, 37, 38
OFFSET
0,3
COMMENTS
The floor of the arithmetic mean of the first n+1 positive integers. - Cino Hilliard, Sep 06 2003
Number of partitions of n into powers of 2 where no power is used more than three times, or 4th binary partition function (see A072170).
Number of partitions of n in which the greatest part is at most 2. - Robert G. Wilson v, Jan 11 2002
Number of partitions of n into at most 2 parts. - Jon Perry, Jun 16 2003
a(n) = #{k=0..n: k+n is even}. - Paul Barry, Sep 13 2003
Number of symmetric Dyck paths of semilength n+2 and having two peaks. E.g., a(6)=4 because we have UUUUUUU*DU*DDDDDDD, UUUUUU*DDUU*DDDDDD, UUUUU*DDDUUU*DDDDD and UUUU*DDDDUUUU*DDDD, where U=(1,1), D=(1,-1) and * indicates a peak. - Emeric Deutsch, Jan 12 2004
Smallest positive integer whose harmonic mean with another positive integer is n (for n > 0). For example, a(6)=4 is already given (as 4 is the smallest positive integer such that the harmonic mean of 4 (with 12) is 6) - but the harmonic mean of 2 (with -6) is also 6 and 2 < 4, so the two positive integer restrictions need to be imposed to rule out both 2 and -6.
Second outermost diagonal of Losanitsch's triangle (A034851). - Alonso del Arte, Mar 12 2006
Arithmetic mean of n-th row of A080511. - Amarnath Murthy, Mar 20 2003
a(n) is the number of ways to pay n euros (or dollars) with coins of one and two euros (respectively dollars). - Richard Choulet and Robert G. Wilson v, Dec 31 2007
Inverse binomial transform of A045623. - Philippe Deléham, Dec 30 2008
Coefficient of q^n in the expansion of (m choose 2)_q as m goes to infinity. - Y. Kelly Itakura (yitkr(AT)mta.ca), Aug 21 2002
This Itakura comment follows from a partial fraction decomposition (m choose 2)_q = [(1-q^(2m-2))/(1+q) + (1-q^(2m-2))/(1-q) +2 (1-q^(m-1))^2/(1-q)^2]/4. Interpreted as generating functions in q, they have convolution structures; the first term in the numerator creates +1,-1,+1,-1 etc, the 2nd term creates +1,+1,+1,+1 etc., the 3rd term 2,4,6,8, etc. as m->infinity. - R. J. Mathar, Sep 25 2008
Binomial transform of (-1)^n*A034008(n) = [1,0,1,-2,4,-8,16,-32,...]. - Philippe Deléham, Nov 15 2009
From Jon Perry_, Nov 16 2010: (Start)
Column sums of:
1 1 1 1 1 1...
1 1 1 1...
1 1...
..............
--------------
1 1 2 2 3 3... (End)
This sequence is also the half-convolution of the powers of 1 sequence A000012 with itself. For the definition of half-convolution see a comment on A201204, where also the rule for the o.g.f. is given. - Wolfdieter Lang, Jan 09 2012
a(n) is also the number of roots of the n-th Bernoulli polynomial in the right half-plane for n>0. - Michel Lagneau, Nov 08 2012
a(n) is the number of symmetry-allowed, linearly-independent terms at n-th order in the series expansion of the Exe vibronic perturbation matrix, H(Q) (cf. Viel & Eisfeld). - Bradley Klee, Jul 21 2015
a(n) is the number of distinct integers in the n-th row of Pascal's triangle. - Melvin Peralta, Feb 03 2016
a(n+1) for n >= 3 is the diameter of the Generalized Petersen Graph G(n, 1). - Nick Mayers, Jun 06 2016
The arithmetic function v_1(n,2) as defined in A289198. - Robert Price, Aug 22 2017
Also, this sequence is the second column in the triangle of the coefficients of the sum of two consecutive Fibonacci polynomials F(n+1, x) and F(n, x) (n>=0) in ascending powers of x. - Mohammad K. Azarian, Jul 18 2018
a(n+2) is the least k such that given any k integers, there exist two of them whose sum or difference is divisible by n. - Pablo Hueso Merino, May 09 2020
Column k = 2 of A051159. - John Keith, Jun 28 2021
REFERENCES
D. J. Benson, Polynomial Invariants of Finite Groups, Cambridge, 1993, p. 100.
L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 109, Eq. [6c]; p. 116, P(n,2).
D. Parisse, 'The tower of Hanoi and the Stern-Brocot Array', Thesis, Munich 1997
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 0..10000
Andrei Asinowski, Cyril Banderier and Valerie Roitner, Generating functions for lattice paths with several forbidden patterns, (2019).
Peter J. Cameron, Sequences realized by oligomorphic permutation groups, J. Integ. Seqs. Vol. 3 (2000), #00.1.5.
L. Colmenarejo, Combinatorics on several families of Kronecker coefficients related to plane partitions, arXiv:1604.00803 [math.CO], 2016. See Table 1 p. 5.
Gerzson Keri and Patric R. J. Östergård, The Number of Inequivalent (2R+3,7)R Optimal Covering Codes, Journal of Integer Sequences, Vol. 9 (2006), Article 06.4.7.
L. F. Klosinski, G. L. Alexanderson and A. P. Hillman, The William Lowell Putnam Mathematical Competition, Amer. Math. Monthly 91 (1984), 487-495. See Problem B2.
Donatella Merlini and Massimo Nocentini, Algebraic Generating Functions for Languages Avoiding Riordan Patterns, Journal of Integer Sequences, Vol. 21 (2018), Article 18.1.3.
Narad Rampersad and Max Wiebe, Sums of products of binomial coefficients mod 2 and 2-regular sequences, arXiv:2309.04012 [math.NT], 2023.
Bruce Reznick, Some binary partition functions, in "Analytic number theory" (Conf. in honor P. T. Bateman, Allerton Park, IL, 1989), 451-477, Progr. Math., 85, Birkhäuser Boston, Boston, MA, 1990.
Alexandra Viel and Wolfgang Eisfeld, Effects of higher order Jahn-Teller coupling on the nuclear dynamics, J. Chem. Phys., 120, 4603 (2004).
Eric Weisstein's World of Mathematics, Legendre-Gauss Quadrature
FORMULA
Euler transform of [1, 1].
a(n) = 1 + floor(n/2).
G.f.: 1/((1-x)(1-x^2)).
E.g.f.: ((3+2*x)*exp(x) + exp(-x))/4.
a(n) = a(n-1) + a(n-2) - a(n-3) = -a(-3-n).
a(0) = a(1) = 1 and a(n) = floor( (a(n-1) + a(n-2))/2 + 1 ).
a(n) = (2*n + 3 + (-1)^n)/4. - Paul Barry, May 27 2003
a(n) = Sum_{k=0..n} Sum_{j=0..k} Sum_{i=0..j} binomial(j, i)*(-2)^i. - Paul Barry, Aug 26 2003
E.g.f.: ((1+x)*exp(x) + cosh(x))/2. - Paul Barry, Sep 13 2003
a(n) = A108299(n-1,n)*(-1)^floor(n/2) for n > 0. - Reinhard Zumkeller, Jun 01 2005
a(n) = A108561(n+2,n) for n > 0. - Reinhard Zumkeller, Jun 10 2005
a(n) = A125291(A125293(n)) for n>0. - Reinhard Zumkeller, Nov 26 2006
a(n) = ceiling(n/2), n >= 1. - Mohammad K. Azarian, May 22 2007
INVERT transformation yields A006054 without leading zeros. INVERTi transformation yields negative of A124745 with the first 5 terms there dropped. - R. J. Mathar, Sep 11 2008
a(n) = A026820(n,2) for n > 1. - Reinhard Zumkeller, Jan 21 2010
a(n) = n - a(n-1) + 1 (with a(0)=1). - Vincenzo Librandi, Nov 19 2010
a(n) = A000217(n) / A110654(n). - Reinhard Zumkeller, Aug 24 2011
a(n+1) = A181971(n,n). - Reinhard Zumkeller, Jul 09 2012
1/(1+2/(2+3/(3+4/(4+5/(5+...(continued fraction))))) = 1/(e-1), see A073333. - Philippe Deléham, Mar 09 2013
a(n) = floor(A000217(n)/n), n > 0. - L. Edson Jeffery, Jul 26 2013
a(n) = n*a(n-1) mod (n+1) = -a(n-1) mod (n+1), the least positive residue modulo n+1 for each expression for n > 0, with a(0) = 1 (basically restatements of Vincenzo Librandi's formula). - Rick L. Shepherd, Apr 02 2014
a(n) = (a(0) + a(1) + ... + a(n-1))/a(n-1), where a(0) = 1. - Melvin Peralta, Jun 16 2015
a(n) = Sum_{k=0..n} (-1)^(n-k) * (k+1). - Rick L. Shepherd, Sep 18 2020
a(n) = a(n-2) + 1 for n >= 2. - Vladimír Modrák, Sep 29 2020
a(n) = A004526(n)+1. - Chai Wah Wu, Jul 07 2022
MAPLE
a:= n-> iquo(n+2, 2): seq(a(n), n=0..75);
MATHEMATICA
Flatten[Table[{n, n}, {n, 35}]] (* Harvey P. Dale, Sep 20 2011 *)
With[{c=Range[40]}, Riffle[c, c]] (* Harvey P. Dale, Feb 23 2013 *)
CoefficientList[Series[1/(1 - x - x^2 + x^3), {x, 0, 75}], x] (* Robert G. Wilson v, Feb 05 2015 *)
LinearRecurrence[{1, 1, -1}, {1, 1, 2}, 75] (* Robert G. Wilson v, Feb 05 2015 *)
Table[QBinomial[n, 2, -1], {n, 2, 75}] (* John Keith, Jun 28 2021 *)
PROG
(PARI) a(n)=n\2+1
(Haskell)
a008619 = (+ 1) . (`div` 2)
a008619_list = concatMap (\x -> [x, x]) [1..]
-- Reinhard Zumkeller, Apr 02 2012
(Sage)
a = lambda n: 1 if n==0 else a(n-1)+1 if 2.divides(n) else a(n-1) # Peter Luschny, Feb 05 2015
(Magma) I:=[1, 1, 2]; [n le 3 select I[n] else Self(n-1)+Self(n-2)-Self(n-3): n in [1..100]]; // Vincenzo Librandi, Feb 04 2015
(Scala) (2 to 99).map(_ / 2) // Alonso del Arte, May 09 2020
(Python)
def A008619(n): return (n>>1)+1 # Chai Wah Wu, Jul 07 2022
CROSSREFS
Essentially same as A004526.
Harmonic mean of a(n) and A056136 is n.
a(n)=A010766(n+2, 2).
Cf. A010551 (partial products).
Cf. A263997 (a block spiral).
Cf. A289187.
Column 2 of A235791.
KEYWORD
nonn,easy,nice
EXTENSIONS
Additional remarks from Daniele Parisse
Edited by N. J. A. Sloane, Sep 06 2009
Partially edited by Joerg Arndt, Mar 11 2010
STATUS
approved
Number of partitions of n into an even number of parts.
+10
185
1, 0, 1, 1, 3, 3, 6, 7, 12, 14, 22, 27, 40, 49, 69, 86, 118, 146, 195, 242, 317, 392, 505, 623, 793, 973, 1224, 1498, 1867, 2274, 2811, 3411, 4186, 5059, 6168, 7427, 9005, 10801, 13026, 15572, 18692, 22267, 26613, 31602, 37619, 44533, 52815, 62338, 73680, 86716, 102162, 119918
OFFSET
0,5
COMMENTS
Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
For n > 0, also the number of partitions of n whose greatest part is even. [Edited by Gus Wiseman, Jan 05 2021]
Number of partitions of n+1 into an odd number of parts, the least being 1.
Also the number of partitions of n such that the number of even parts has the same parity as the number of odd parts; see Comments at A027193. - Clark Kimberling, Feb 01 2014, corrected Jan 06 2021
Suppose that c(0) = 1, that c(1), c(2), ... are indeterminates, that d(0) = 1, and that d(n) = -c(n) - c(n-1)*d(1) - ... - c(0)*d(n-1). When d(n) is expanded as a polynomial in c(1), c(2),..,c(n), the terms are of the form H*c(i_1)*c(i_2)*...*c(i_k). Let P(n) = [c(i_1), c(i_2), ..., c(i_k)], a partition of n. Then H is negative if P has an odd number of parts, and H is positive if P has an even number of parts. That is, d(n) has A027193(n) negative coefficients, A027187(n) positive coefficients, and A000041 terms. The maximal coefficient in d(n), in absolute value, is A102462(n). - Clark Kimberling, Dec 15 2016
REFERENCES
N. J. Fine, Basic Hypergeometric Series and Applications, Amer. Math. Soc., 1988; See p. 8, (7.323) and p. 39, Example 7.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..10000 (first 1000 terms from T. D. Noe)
George E. Andrews and David Newman, The Minimal Excludant in Integer Partitions, J. Int. Seq., Vol. 23 (2020), Article 20.2.3.
Arvind Ayyer, Hiranya Kishore Dey, and Digjoy Paul, How large is the character degree sum compared to the character table sum for a finite group?, arXiv:2406.06036 [math.RT], 2024. See p. 13.
Roland Bacher and Pierre De La Harpe, Conjugacy growth series of some infinitely generated groups, International Mathematics Research Notices, 2016, pp.1-53. (hal-01285685v2)
N. J. Fine, Problem 4314, Amer. Math. Monthly, Vol. 57, 1950, 421-423.
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 p_e(n).
Eric Weisstein's World of Mathematics, Ramanujan Theta Functions
FORMULA
a(n) = (A000041(n) + (-1)^n * A000700(n))/2.
a(n) = p(n) - p(n-1) + p(n-4) - p(n-9) + ... where p(n) is the number of unrestricted partitions of n, A000041. [Fine] - David Callan, Mar 14 2004
From Bill Gosper, Jun 25 2005: (Start)
G.f.: A(q) = Sum_{n >= 0} a(n) q^n = 1 + q^2 + q^3 + 3 q^4 + 3 q^5 + 6 q^6 + ...
= Sum_{n >= 0} q^(2n)/(q; q)_{2n}
= ((Product_{k >= 1} 1/(1-q^k) + (Product_{k >= 1} 1/(1+q^k))/2.
Also, let B(q) = Sum_{n >= 0} A027193(n) q^n = q + q^2 + 2 q^3 + 2 q^4 + 4 q^5 + 5 q^6 + ...
Then B(q) = Sum_{n >= 0} q^(2n+1)/(q; q)_{2n+1} = ((Product_{k >= 1} 1/(1-q^k) - (Product_{k >= 1} 1/(1+q^k))/2.
Also we have the following identity involving 2 X 2 matrices:
Product_{k >= 1} [ 1/(1-q^2k) q^k/(1-q^2k / q^k/(1-q^2k) 1/(1-q^2k) ]
= [ A(q) B(q) / B(q) A(q) ]. (End)
a(2*n) = A046682(2*n), a(2*n+1) = A000701(2*n+1); a(n) = A000041(n)-A027193(n). - Reinhard Zumkeller, Apr 22 2006
Expansion of (1 + phi(-q)) / (2 * f(-q)) where phi(), f() are Ramanujan theta functions. - Michael Somos, Aug 19 2006
G.f.: (Sum_{k>=0} (-1)^k * x^(k^2)) / (Product_{k>0} (1 - x^k)). - Michael Somos, Aug 19 2006
a(n) = A338914(n) + A096373(n). - Gus Wiseman, Jan 06 2021
EXAMPLE
G.f. = 1 + x^2 + x^3 + 3*x^4 + 3*x^5 + 6*x^6 + 7*x^7 + 12*x^8 + 14*x^9 + 22*x^10 + ...
From Gus Wiseman, Jan 05 2021: (Start)
The a(2) = 1 through a(8) = 12 partitions into an even number of parts are the following. The Heinz numbers of these partitions are given by A028260.
(11) (21) (22) (32) (33) (43) (44)
(31) (41) (42) (52) (53)
(1111) (2111) (51) (61) (62)
(2211) (2221) (71)
(3111) (3211) (2222)
(111111) (4111) (3221)
(211111) (3311)
(4211)
(5111)
(221111)
(311111)
(11111111)
The a(2) = 1 through a(8) = 12 partitions whose greatest part is even are the following. The Heinz numbers of these partitions are given by A244990.
(2) (21) (4) (41) (6) (43) (8)
(22) (221) (42) (61) (44)
(211) (2111) (222) (421) (62)
(411) (2221) (422)
(2211) (4111) (431)
(21111) (22111) (611)
(211111) (2222)
(4211)
(22211)
(41111)
(221111)
(2111111)
(End)
MATHEMATICA
f[n_] := Length[Select[IntegerPartitions[n], IntegerQ[First[#]/2] &]]; Table[f[n], {n, 1, 30}] (* Clark Kimberling, Mar 13 2012 *)
a[ n_] := SeriesCoefficient[ (1 + EllipticTheta[ 4, 0, x]) / (2 QPochhammer[ x]), {x, 0, n}]; (* Michael Somos, May 06 2015 *)
a[ n_] := If[ n < 0, 0, Length@Select[ IntegerPartitions[n], EvenQ[Length @ #] &]]; (* Michael Somos, May 06 2015 *)
PROG
(PARI) {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( sum( k=0, sqrtint(n), (-x)^k^2, A) / eta(x + A), n))}; /* Michael Somos, Aug 19 2006 */
(PARI) q='q+O('q^66); Vec( (1/eta(q)+eta(q)/eta(q^2))/2 ) \\ Joerg Arndt, Mar 23 2014
CROSSREFS
The Heinz numbers of these partitions are A028260.
The odd version is A027193.
The strict case is A067661.
The case of even sum as well as length is A236913 (the even bisection).
Other cases of even length:
- A024430 counts set partitions of even length.
- A034008 counts compositions of even length.
- A052841 counts ordered set partitions of even length.
- A174725 counts ordered factorizations of even length.
- A332305 counts strict compositions of even length
- A339846 counts factorizations of even length.
A000009 counts partitions into odd parts, ranked by A066208.
A026805 counts partitions whose least part is even.
A072233 counts partitions by sum and length.
A101708 counts partitions of even positive rank.
KEYWORD
nonn
EXTENSIONS
Offset changed to 0 by Michael Somos, Jul 24 2012
STATUS
approved
Zero followed by powers of 2 (cf. A000079).
+10
117
0, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648, 4294967296, 8589934592
OFFSET
0,3
COMMENTS
A000079 is the main entry for this sequence.
Binomial transform of A000035.
Essentially the same as A034008 and A000079.
a(n) = a(n-1)-th even natural numbers (A005846) for n > 1. - Jaroslav Krizek, Apr 25 2009
Where record values greater than 1 occur in A083662: A000045(n)=A083662(a(n)). - Reinhard Zumkeller, Sep 26 2009
Number of compositions of natural number n into parts >0.
The signed sequence 0, 1, -2, 4, -8, 16, -32, 64, -128, 256, -512, 1024, ... is the Lucas U(-2,0) sequence. - R. J. Mathar, Jan 08 2013
In computer programming, these are the only unsigned numbers such that k&(k-1)=0, where & is the bitwise AND operator and numbers are expressed in binary. - Stanislav Sykora, Nov 29 2013
Also the 0-additive sequence: a(n) is the smallest number larger than a(n-1) which is not the sum of any subset of earlier terms, with initial values {0, 1, 2}. - Robert G. Wilson v, Jul 12 2014
Also the smallest nonnegative superincreasing sequence: each term is larger than the sum of all preceding terms. Indeed, an equivalent definition is a(0)=0, a(n+1)=1+sum_{k=0..n} a(k). - M. F. Hasler, Jan 13 2015
REFERENCES
Mohammad K. Azarian, A Generalization of the Climbing Stairs Problem, Mathematics and Computer Education Journal, Vol. 31, No. 1, pp. 24-28, Winter 1997.
FORMULA
a(n) = floor(2^(n-1)). - Robert G. Wilson v, Sep 02 2007
G.f.: x/(1-2*x); a(n) = (2^n-0^n)/2. - Paul Barry, Jan 05 2009
E.g.f.: exp(x)*sinh(x). - Geoffrey Critzer, Oct 28 2012
E.g.f.: x/T(0) where T(k) = 4*k+1 - x/(1 + x/(4*k+3 - x/(1 + x/T(k+1) ))); (continued fraction). - Sergei N. Gladkovskii, Mar 17 2013
a(n) = Sum_{k=0..floor((n+1)/2)} binomial(n, 2*k-1). - Taras Goy, Jan 02 2025
MAPLE
A131577 := proc(n)
if n =0 then
0;
else
2^(n-1) ;
end if;
end proc: # R. J. Mathar, Jul 22 2012
MATHEMATICA
Floor[2^Range[-1, 33]] (* Robert G. Wilson v, Sep 02 2007 *)
Join[{0}, 2^Range[0, 60]] (* Vladimir Joseph Stephan Orlovsky, Jun 09 2011 *)
PROG
(Magma) [(2^n-0^n)/2: n in [0..50]]; // Vincenzo Librandi, Aug 10 2011
(C) int is (unsigned long n) { return !(n & (n-1)); } /* Charles R Greathouse IV, Sep 15 2012 */
(PARI) a(n)=1<<n-- \\ Charles R Greathouse IV, Sep 15 2012
(Haskell)
a131577 = (`div` 2) . a000079
a131577_list = 0 : a000079_list -- Reinhard Zumkeller, Dec 09 2012
(Python)
def A131577(n): return 1<<n-1 if n else 0 # Chai Wah Wu, Sep 09 2023
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Aug 29 2007, Dec 06 2007
EXTENSIONS
More terms from Robert G. Wilson v, Sep 02 2007
Edited by N. J. A. Sloane, Sep 13 2007
Edited by M. F. Hasler, Jan 13 2015
STATUS
approved
Number of partitions of n into distinct parts such that number of parts is even.
+10
53
1, 0, 0, 1, 1, 2, 2, 3, 3, 4, 5, 6, 7, 9, 11, 13, 16, 19, 23, 27, 32, 38, 45, 52, 61, 71, 83, 96, 111, 128, 148, 170, 195, 224, 256, 292, 334, 380, 432, 491, 556, 630, 713, 805, 908, 1024, 1152, 1295, 1455, 1632, 1829, 2049, 2291, 2560, 2859, 3189, 3554, 3959, 4404
OFFSET
0,6
COMMENTS
Ramanujan theta functions: phi(q) (A000122), chi(q) (A000700).
REFERENCES
B. C. Berndt, Ramanujan's Notebooks Part III, Springer-Verlag, see p. 18 Entry 9 Corollary (2).
LINKS
Joerg Arndt, Matters Computational (The Fxtbook), end of section 16.4.2 "Partitions into distinct parts", pp.348ff
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_e(n).
Eric Weisstein's World of Mathematics, Ramanujan Theta Functions
FORMULA
G.f.: A(q) = Sum_{n >= 0} a(n) q^n = 1 + q^3 + q^4 + 2 q^5 + 2 q^6 + 3 q^7 + ... = Sum_{n >= 0} q^(n(2n+1))/(q; q)_{2n} [Bill Gosper, Jun 25 2005]
Also, let B(q) = Sum_{n >= 0} A067659(n) q^n = q + q^2 + q^3 + q^4 + q^5 + 2 q^6 + ... Then B(q) = Sum_{n >= 0} q^((n+1)(2n+1))/(q; q)_{2n+1}.
Also we have the following identity involving 2 X 2 matrices:
Prod_{k >= 1} [ 1, q^k; q^k, 1 ] = [ A(q), B(q); B(q), A(q) ] [Bill Gosper, Jun 25 2005]
a(n) = (A000009(n)+A010815(n))/2. - Vladeta Jovovic, Feb 24 2002
Expansion of (1 + phi(-x)) / (2*chi(-x)) in powers of x where phi(), chi() are Ramanujan theta functions. - Michael Somos, Feb 14 2006
a(n) + A067659(n) = A000009(n). - R. J. Mathar, Jun 18 2016
a(n) ~ exp(Pi*sqrt(n/3)) / (8*3^(1/4)*n^(3/4)). - Vaclav Kotesovec, May 24 2018
A000009(n) = a(n) + A067659(n). - Gus Wiseman, Jan 09 2021
From Peter Bala, Feb 05 2021: (Start)
G.f.: A(x) = (1/2)*((Product_{n >= 0} 1 + x^n) + (Product_{n >= 0} 1 - x^n)).
Let B(x) denote the g.f. of A067659. Then
A(x)^2 - B(x)^2 = A(x^2) - B(x^2) = Product_{n >= 1} 1 - x^(2*n) = Sum_{n in Z} (-1)^n*x^(n*(3*n+1)).
A(x) + B(x) is the g.f. of A000009.
1/(A(x) - B(x)) is the g.f. of A000041.
(A(x) + B(x))/(A(x) - B(x)) is the g.f. of A015128.
A(x)/(A(x) + B(x)) = Sum_{n >= 0} (-1)^n*x^n^2 = (1 + theta_3(-x))/2.
B(x)/(A(x) - B(x)) is the g.f. of A014968.
A(x)/(A(x^2) - B(x^2)) is the g.f. of A027187.
B(x)/(A(x^2) - B(x^2)) is the g.f. of A027193. (End)
EXAMPLE
G.f. = 1 + x^3 + x^4 + 2*x^5 + 2*x^6 + 3*x^7 + 3*x^8 + 4*x^9 + 5*x^10 + ...
From Gus Wiseman, Jan 08 2021: (Start)
The a(3) = 1 through a(14) = 11 partitions (A-D = 10..13):
21 31 32 42 43 53 54 64 65 75 76 86
41 51 52 62 63 73 74 84 85 95
61 71 72 82 83 93 94 A4
81 91 92 A2 A3 B3
4321 A1 B1 B2 C2
5321 5421 C1 D1
6321 5431 5432
6421 6431
7321 6521
7421
8321
(End)
MAPLE
b:= proc(n, i, t) option remember; `if`(n>i*(i+1)/2, 0,
`if`(n=0, t, add(b(n-i*j, i-1, abs(t-j)), j=0..min(n/i, 1))))
end:
a:= n-> b(n$2, 1):
seq(a(n), n=0..80); # Alois P. Heinz, Apr 01 2014
MATHEMATICA
b[n_, i_, t_] := b[n, i, t] = If[n > i*(i + 1)/2, 0, If[n == 0, t, Sum[b[n - i*j, i - 1, Abs[t - j]], {j, 0, Min[n/i, 1]}]]]; a[n_] := b[n, n, 1]; Table[a[n], {n, 0, 80}] (* Jean-François Alcover, Jan 16 2015, after Alois P. Heinz *)
a[ n_] := SeriesCoefficient[ (QPochhammer[ -x, x] + QPochhammer[ x]) / 2, {x, 0, n}]; (* Michael Somos, May 06 2015 *)
Table[Length[Select[IntegerPartitions[n], UnsameQ@@#&&EvenQ[Length[#]]&]], {n, 0, 30}] (* Gus Wiseman, Jan 08 2021 *)
PROG
(PARI) {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( (eta(x^2 + A) / eta(x + A) + eta(x + A)) / 2, n))}; /* Michael Somos, Feb 14 2006 */
(PARI) N=66; q='q+O('q^N); S=1+2*sqrtint(N);
gf=sum(n=0, S, (n%2==0) * q^(n*(n+1)/2) / prod(k=1, n, 1-q^k ) );
Vec(gf) \\ Joerg Arndt, Apr 01 2014
CROSSREFS
Dominates A000009.
Numbers with these strict partitions as binary indices are A001969.
The non-strict case is A027187, ranked by A028260.
The Heinz numbers of these partitions are A030229.
The odd version is A067659, ranked by A030059.
The version for rank is A117192, with positive case A101708.
Other cases of even length:
- A024430 counts set partitions of even length.
- A034008 counts compositions of even length.
- A052841 counts ordered set partitions of even length.
- A174725 counts ordered factorizations of even length.
- A332305 counts strict compositions of even length
- A339846 counts factorizations of even length.
A008289 counts strict partitions by sum and length.
A026805 counts partitions whose least part is even.
KEYWORD
easy,nonn
AUTHOR
Naohiro Nomoto, Feb 23 2002
STATUS
approved
Number of partitions of 2n of type EE (see Comments).
+10
49
1, 1, 3, 6, 12, 22, 40, 69, 118, 195, 317, 505, 793, 1224, 1867, 2811, 4186, 6168, 9005, 13026, 18692, 26613, 37619, 52815, 73680, 102162, 140853, 193144, 263490, 357699, 483338, 650196, 870953, 1161916, 1544048, 2044188, 2696627, 3545015, 4644850, 6066425
OFFSET
0,3
COMMENTS
The partitions of n are partitioned into four types:
EO, even # of odd parts and odd # of even parts, A236559;
OE, odd # of odd parts and even # of even parts, A160786;
EE, even # of odd parts and even # of even parts, A236913;
OO, odd # of odd parts and odd # of even parts, A236914.
A236559 and A160786 are the bisections of A027193;
A236913 and A236914 are the bisections of A027187.
LINKS
EXAMPLE
The partitions of 4 of type EE are [3,1], [2,2], [1,1,1,1], so that a(2) = 3.
type/k . 1 .. 2 .. 3 .. 4 .. 5 .. 6 .. 7 .. 8 ... 9 ... 10 .. 11
EO ..... 0 .. 1 .. 0 .. 2 .. 0 .. 5 .. 0 .. 10 .. 0 ... 20 .. 0
OE ..... 1 .. 0 .. 2 .. 0 .. 4 .. 0 .. 8 .. 0 ... 16 .. 0 ... 29
EE ..... 0 .. 1 .. 0 .. 3 .. 0 .. 6 .. 0 .. 12 .. 0 ... 22 .. 0
OO ..... 0 .. 0 .. 1 .. 0 .. 3 .. 0 .. 7 .. 0 ... 14 .. 0 ... 27
From Gus Wiseman, Feb 09 2021: (Start)
This sequence counts even-length partitions of even numbers, which have Heinz numbers given by A340784. For example, the a(0) = 1 through a(4) = 12 partitions are:
() (11) (22) (33) (44)
(31) (42) (53)
(1111) (51) (62)
(2211) (71)
(3111) (2222)
(111111) (3221)
(3311)
(4211)
(5111)
(221111)
(311111)
(11111111)
(End)
MAPLE
b:= proc(n, i) option remember; `if`(n=0, [1, 0$3],
`if`(i<1, [0$4], b(n, i-1)+`if`(i>n, [0$4], (p->
`if`(irem(i, 2)=0, [p[3], p[4], p[1], p[2]],
[p[2], p[1], p[4], p[3]]))(b(n-i, i)))))
end:
a:= n-> b(2*n$2)[1]:
seq(a(n), n=0..40); # Alois P. Heinz, Feb 16 2014
MATHEMATICA
z = 25; m1 = Map[Length[Select[Map[{Count[#, True], Count[#, False]} &, OddQ[IntegerPartitions[2 #]]], EvenQ[(*Odd*)First[#]] && OddQ[(*Even*)Last[#]] &]] &, Range[z]]; m2 = Map[Length[Select[Map[{Count[#, True], Count[#, False]} &, OddQ[IntegerPartitions[2 # - 1]]], OddQ[(*Odd*)First[#]] && EvenQ[(*Even*)Last[#]] &]] &, Range[z]]; m3 = Map[Length[Select[Map[{Count[#, True], Count[#, False]} &,
OddQ[IntegerPartitions[2 #]]], EvenQ[(*Odd*)First[#]] && EvenQ[(*Even*)Last[#]] &]] &, Range[z]] ; m4 = Map[Length[Select[Map[{Count[#, True], Count[#, False]} &,
OddQ[IntegerPartitions[2 # - 1]]], OddQ[(*Odd*)First[#]] && OddQ[(*Even*)Last[#]] &]] &, Range[z]];
m1 (* A236559, type EO*)
m2 (* A160786, type OE*)
m3 (* A236913, type EE*)
m4 (* A236914, type OO*)
(* Peter J. C. Moses, Feb 03 2014 *)
b[n_, i_] := b[n, i] = If[n == 0, {1, 0, 0, 0}, If[i < 1, {0, 0, 0, 0}, b[n, i - 1] + If[i > n, {0, 0, 0, 0}, Function[p, If[Mod[i, 2] == 0, p[[{3, 4, 1, 2}]], p[[{2, 1, 4, 3}]]]][b[n - i, i]]]]]; a[n_] := b[2*n, 2*n][[1]]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Oct 27 2015, after Alois P. Heinz *)
Table[Length[Select[IntegerPartitions[2n], EvenQ[Length[#]]&]], {n, 0, 15}] (* Gus Wiseman, Feb 09 2021 *)
CROSSREFS
Note: A-numbers of ranking sequences are in parentheses below.
The ordered version is A000302.
The case of odd-length partitions of odd numbers is A160786 (A340931).
The Heinz numbers of these partitions are (A340784).
A027187 counts partitions of even length/maximum (A028260/A244990).
A034008 counts compositions of even length.
A035363 counts partitions into even parts (A066207).
A047993 counts balanced partitions (A106529).
A058695 counts partitions of odd numbers (A300063).
A058696 counts partitions of even numbers (A300061).
A067661 counts strict partitions of even length (A030229).
A072233 counts partitions by sum and length.
A339846 counts factorizations of even length.
A340601 counts partitions of even rank (A340602).
A340785 counts factorizations into even factors.
A340786 counts even-length factorizations into even factors.
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Feb 01 2014
EXTENSIONS
More terms from Alois P. Heinz, Feb 16 2014
STATUS
approved
Number of partitions of n with nonnegative crank.
+10
47
1, 0, 1, 2, 3, 4, 6, 8, 12, 16, 23, 30, 42, 54, 73, 94, 124, 158, 206, 260, 334, 420, 532, 664, 835, 1034, 1288, 1588, 1962, 2404, 2953, 3598, 4392, 5328, 6466, 7808, 9432, 11338, 13632, 16326, 19544, 23316, 27806, 33054, 39273, 46534, 55096, 65076, 76808
OFFSET
0,4
COMMENTS
For a partition p, let l(p) = largest part of p, w(p) = number of 1's in p, m(p) = number of parts of p larger than w(p). The crank of p is given by l(p) if w(p) = 0, otherwise m(p)-w(p).
From Gus Wiseman, Mar 30 2021 and May 21 2022: (Start)
Also the number of even-length compositions of n with alternating parts strictly decreasing, or properly 2-colored partitions (proper = no equal parts of the same color) with the same number of parts of each color, or ordered pairs of strict partitions of the same length with total n. The odd-length case is A001522, and there are a total of A000041 compositions with alternating parts strictly decreasing (see A342528 for a bijective proof). The a(2) = 1 through a(7) = 8 ordered pairs of strict partitions of the same length are:
(1)(1) (1)(2) (1)(3) (1)(4) (1)(5) (1)(6)
(2)(1) (2)(2) (2)(3) (2)(4) (2)(5)
(3)(1) (3)(2) (3)(3) (3)(4)
(4)(1) (4)(2) (4)(3)
(5)(1) (5)(2)
(21)(21) (6)(1)
(21)(31)
(31)(21)
Conjecture: Also the number of integer partitions y of n without a fixed point y(i) = i, ranked by A352826. This is stated at A238394, but Resta tells me he may not have had a proof. The a(2) = 1 through a(7) = 8 partitions without a fixed point are:
(2) (3) (4) (5) (6) (7)
(21) (31) (41) (33) (43)
(211) (311) (51) (61)
(2111) (411) (331)
(3111) (511)
(21111) (4111)
(31111)
(211111)
The version for permutations is A000166, complement A002467.
The version for compositions is A238351.
This is column k = 0 of A352833.
A238352 counts reversed partitions by fixed points, rank statistic A352822.
A238394 counts reversed partitions without a fixed point, ranked by A352830.
A238395 counts reversed partitions with a fixed point, ranked by A352872. (End)
The above conjecture is true. See Section 4 of the Blecher-Knopfmacher paper in the Links section. - Jeremy Lovejoy, Sep 26 2022
REFERENCES
B. C. Berndt, Ramanujan's Notebooks Part III, Springer-Verlag, see p. 18 Entry 9 Corollary (i).
G. E. Andrews, B. C. Berndt, Ramanujan's Lost Notebook Part I, Springer, see p. 169 Entry 6.7.1.
LINKS
George E. Andrews and David Newman, The Minimal Excludant in Integer Partitions, J. Int. Seq., Vol. 23 (2020), Article 20.2.3.
Cody Armond and Oliver T. Dasbach, Rogers-Ramanujan type identities and the head and tail of the colored Jones polynomial, arXiv:1106.3948 [math.GT], 2011.
Cristina Ballantine and Mircea Merca, Bisected theta series, least r-gaps in partitions, and polygonal numbers, arXiv:1710.05960 [math.CO], 2017.
Rupam Barman and Ajit Singh, On Mex-related partition functions of Andrews and Newman, arXiv:2009.11602 [math.NT], 2020.
Aubrey Blecher and Arnold Knopfmacher, Fixed points and matching points in partitions, Ramanujan J. 58 (2022), 23-41.
Brian Hopkins, James A. Sellers, and Ae Ja Yee, Combinatorial Perspectives on the Crank and Mex Partition Statistics, arXiv:2108.09414 [math.CO], 2021.
Mbavhalelo Mulokwe and Konstantinos Zoubos, Free fermions, neutrality and modular transformations, arXiv:2403.08531 [hep-th], 2024.
FORMULA
a(n) = (A000041(n) + A064410(n)) / 2, n>1. - Michael Somos, Jul 28 2003
G.f.: (Sum_{k>=0} (-1)^k * x^(k(k+1)/2)) / (Product_{k>0} 1-x^k). - Michael Somos, Jul 28 2003
G.f.: Sum_{i>=0} x^(i*(i+1)) / (Product_{j=1..i} 1-x^j )^2. - Jon Perry, Jul 18 2004
a(n) ~ exp(Pi*sqrt(2*n/3)) / (8*n*sqrt(3)). - Vaclav Kotesovec, Sep 26 2016
G.f.: (Sum_{i>=0} x^i / (Product_{j=1..i} 1-x^j)^2 ) * (Product_{k>0} 1-x^k). - Li Han, May 23 2020
a(n) = A000041(n) - A001522(n). - Gus Wiseman, Mar 30 2021
a(n) = A064410(n) + A001522(n). - Gus Wiseman, May 21 2022
EXAMPLE
G.f. = 1 + x^2 + 2*x^3 + 3*x^4 + 4*x^5 + 6*x^6 + 8*x^7 + 12*x^8 + 16*x^9 + 23*x^10 + ... - Michael Somos, Jan 15 2018
From Gus Wiseman, May 21 2022: (Start)
The a(0) = 1 through a(8) = 12 partitions with nonnegative crank:
() . (2) (3) (4) (5) (6) (7) (8)
(21) (22) (32) (33) (43) (44)
(31) (41) (42) (52) (53)
(221) (51) (61) (62)
(222) (322) (71)
(321) (331) (332)
(421) (422)
(2221) (431)
(521)
(2222)
(3221)
(3311)
(End)
MATHEMATICA
a[ n_] := If[ n < 0, 0, SeriesCoefficient[ Sum[ (-1)^k x^(k (k + 1)/2) , {k, 0, (Sqrt[1 + 8 n] - 1)/2}] / QPochhammer[ x], {x, 0, n}]]; (* Michael Somos, Jan 15 2018 *)
a[ n_] := If[ n < 0, 0, SeriesCoefficient[ Sum[ x^(k (k + 1)) / QPochhammer[ x, x, k]^2 , {k, 0, (Sqrt[1 + 4 n] - 1)/2}], {x, 0, n}]]; (* Michael Somos, Jan 15 2018 *)
ck[y_]:=With[{w=Count[y, 1]}, If[w==0, If[y=={}, 0, Max@@y], Count[y, _?(#>w&)]-w]]; Table[Length[Select[IntegerPartitions[n], ck[#]>=0&]], {n, 0, 30}] (* Gus Wiseman, Mar 30 2021 *)
ici[q_]:=And@@Table[q[[i]]>q[[i+2]], {i, Length[q]-2}];
Table[Length[Select[Join@@Permutations/@Select[IntegerPartitions[n], EvenQ@*Length], ici]], {n, 0, 15}] (* Gus Wiseman, Mar 30 2021 *)
PROG
(PARI) {a(n) = if( n<0, 0, polcoeff( sum(k=0, (sqrtint(1 + 8*n) -1)\2, (-1)^k * x^((k+k^2)/2)) / eta( x + x * O(x^n)), n))}; /* Michael Somos, Jul 28 2003 */
CROSSREFS
These are the row-sums of the right (or left) half of A064391, inclusive.
The case of crank 0 is A064410, ranked by A342192.
The strict case is A352828.
These partitions are ranked by A352873.
A000700 = self-conjugate partitions, ranked by A088902, complement A330644.
A001522 counts partitions with positive crank, ranked by A352874.
A034008 counts even-length compositions.
A115720 and A115994 count partitions by their Durfee square.
A224958 counts compositions w/ alternating parts unequal (even: A342532).
A257989 gives the crank of the partition with Heinz number n.
A342527 counts compositions w/ alternating parts equal (even: A065608).
A342528 = compositions w/ alternating parts weakly decr. (even: A114921).
KEYWORD
nonn
AUTHOR
Vladeta Jovovic, Sep 30 2001
STATUS
approved
Powers of -2: a(n) = (-2)^n.
+10
36
1, -2, 4, -8, 16, -32, 64, -128, 256, -512, 1024, -2048, 4096, -8192, 16384, -32768, 65536, -131072, 262144, -524288, 1048576, -2097152, 4194304, -8388608, 16777216, -33554432, 67108864, -134217728, 268435456, -536870912, 1073741824, -2147483648, 4294967296, -8589934592, 17179869184
OFFSET
0,2
COMMENTS
The number -2 can be used as a base of numeration (see the Weisstein link). - Alonso del Arte, Mar 30 2014
Contribution from M. F. Hasler, Oct 21 2014: (Start)
This is the inverse binomial transform of A033999 = n->(-1)^n, and the binomial transform of A033999*A000244 = n->(-3)^n, see also A141413.
Prefixed with one 0, i.e., (0,1,-2,4,...) = -A033999*A131577, it is the binomial transform of (0, 1, -4, 13, -40, 121,...) = -A033999*A003462, and inverse binomial transform of (0,1,0,1,0,1,...) = A000035.
Prefixed with two 0's, i.e., (0,0,1,-2,4,-8,...), it is the binomial transform of (0,0,1,-5,18,-58,179,-543,...) (cf. A000340) and inverse binomial transform of (0,0,1,1,2,2,3,3,...) = A004526. (End)
Prefixed with three 0's, this is the inverse binomial difference of (0, 0, 0, 1, 2, 4, 6, 9, 12, 16,...) = concat(0, A002620), which has as successive differences (0, 0, 1, 1, 2, 2,...) = A004526, then (0, 1, 0, 1,...) = A000035, then (1, -1, 1, -1,...) = A033999, and then (-2)^k*A033999 with k=1,2,3,... - Paul Curtz, Oct 16 2014, edited by M. F. Hasler, Oct 21 2014
Stirling-Bernoulli transform of triangular numbers: 1, 3, 6, 10, 15, 21, 28, ... - Philippe Deléham, May 25 2015
LINKS
Franklin T. Adams-Watters, Table of n, (-2)^n for n = 0..1000
Tanya Khovanova, Recursive Sequences
Eric Weisstein's World of Mathematics, Negabinary.
FORMULA
a(n) = (-2)^n = (-1)^n * 2^n.
a(n) = -2*a(n-1), n > 0; a(0) = 1. G.f.: 1/(1+2x). - Philippe Deléham, Nov 19 2008
Sum_{n >= 0} 1/a(n) = 2/3. - Jaume Oliver Lafont, Mar 01 2009
E.g.f.: 1/exp(2*x). - Arkadiusz Wesolowski, Aug 13 2012
a(n) = Sum_{k = 0..n} (-2)^(n-k)*binomial(n, k)*A030195(n+1). - R. J. Mathar, Oct 15 2012
G.f.: 1/(1+2x). A122803 = A033999 * A000079. - M. F. Hasler, Oct 21 2014
a(n) = Sum_{k = 0..n} A163626(n,k)*A000217(k+1). - Philippe Deléham, May 25 2015
MAPLE
A122803:=n->(-2)^n; seq(A122803(n), n=0..50); # Wesley Ivan Hurt, Mar 30 2014
MATHEMATICA
Table[(-2)^n, {n, 0, 50}] (* Vladimir Joseph Stephan Orlovsky, Feb 15 2011 *)
PROG
(Magma) [(-2)^n: n in [0..60]]; // Vincenzo Librandi, Oct 22 2014
(PARI) a(n)=(-2)^n \\ Charles R Greathouse IV, Sep 24 2015
(Python)
def A122803(n): return -(1<<n) if n&1 else 1<<n # Chai Wah Wu, Nov 18 2022
CROSSREFS
KEYWORD
easy,sign
AUTHOR
STATUS
approved
Number of partitions of n with zero crank.
+10
29
0, 0, 1, 1, 1, 1, 1, 2, 2, 4, 4, 7, 7, 11, 12, 17, 19, 27, 30, 41, 48, 62, 73, 95, 110, 140, 166, 206, 243, 302, 354, 435, 513, 622, 733, 887, 1039, 1249, 1467, 1750, 2049, 2438, 2847, 3371, 3934, 4634, 5398, 6343, 7367, 8626, 10009, 11677, 13521, 15737, 18184
OFFSET
1,8
COMMENTS
For a partition p, let l(p) = largest part of p, w(p) = number of 1's in p, m(p) = number of parts of p larger than w(p). The crank of p is given by l(p) if w(p) = 0, otherwise m(p)-w(p).
LINKS
Alois P. Heinz and Vaclav Kotesovec, Table of n, a(n) for n = 1..10000 (terms 1..1000 from Alois P. Heinz)
Brian Hopkins and James A. Sellers, On Blecher and Knopfmacher's Fixed Points for Integer Partitions, arXiv:2305.05096 [math.CO], 2023. Mentions this sequence.
Brian Hopkins, James A. Sellers, and Dennis Stanton, Dyson's Crank and the Mex of Integer Partitions, arXiv:2009.10873 [math.CO], 2020. Mentions this sequence.
FORMULA
a(n) = A000041(n)-2*A001522(n). a(n) = A064391(n, 0).
a(n) ~ exp(Pi*sqrt(2*n/3)) * Pi / (3 * 2^(9/2) * n^(3/2)). - Vaclav Kotesovec, May 06 2018
a(n > 1) = A064428(n) - A001522(n), where A001522/A064428 count odd/even-length compositions with alternating parts strictly decreasing. - Gus Wiseman, Apr 02 2021
EXAMPLE
a(10)=4 because there are 4 partitions of 10 with zero crank: 1+1+2+3+3, 1+1+4+4, 1+1+3+5 and 1+9.
From Gus Wiseman, Apr 02 2021: (Start)
The a(3) = 1 through a(14) = 11 partitions (A..D = 10..13):
21 31 41 51 61 71 81 91 A1 B1 C1 D1
3311 4311 4411 5411 5511 6511 6611
5311 6311 6411 7411 7511
33211 43211 7311 8311 8411
44211 54211 9311
53211 63211 55211
332211 432211 64211
73211
442211
532211
3322211
(End)
MATHEMATICA
nmax = 60; Rest[CoefficientList[Series[x - 1 + Sum[(-1)^k*(x^(k*(k + 1)/2) - x^(k*(k - 1)/2)), {k, 1, nmax}] / Product[1 - x^k, {k, 1, nmax}], {x, 0, nmax}], x]] (* Vaclav Kotesovec, Sep 26 2016 *)
Flatten[{0, Table[PartitionsP[n] - 2*Sum[(-1)^(j+1)*PartitionsP[n - j*((j+1)/2)], {j, 1, Floor[(Sqrt[8*n + 1] - 1)/2]}], {n, 2, 60}]}] (* Vaclav Kotesovec, Sep 26 2016 *)
ck[y_]:=With[{w=Count[y, 1]}, If[w==0, Max@@y, Count[y, _?(#>w&)]-w]];
Table[Length[Select[IntegerPartitions[n], ck[#]==0&]], {n, 0, 30}] (* Gus Wiseman, Apr 02 2021 *)
PROG
(Sage)
[[p.crank() for p in Partitions(n)].count(0) for n in (1..20)] # Peter Luschny, Sep 15 2014
CROSSREFS
The version for positive crank is A001522.
Central column of A064391.
The version for nonnegative crank is A064428.
The Heinz numbers of these partitions are A342192.
A003242 counts anti-run compositions.
A224958 counts compositions with alternating parts unequal.
A257989 gives the crank of the partition with Heinz number n.
KEYWORD
nonn
AUTHOR
Vladeta Jovovic, Sep 29 2001
EXTENSIONS
More terms from Reiner Martin, Dec 26 2001
STATUS
approved
Number of integer partitions of n of even rank.
+10
27
1, 1, 0, 3, 1, 5, 3, 11, 8, 18, 16, 34, 33, 57, 59, 98, 105, 159, 179, 262, 297, 414, 478, 653, 761, 1008, 1184, 1544, 1818, 2327, 2750, 3480, 4113, 5137, 6078, 7527, 8899, 10917, 12897, 15715, 18538, 22431, 26430, 31805, 37403, 44766, 52556, 62620, 73379
OFFSET
0,4
COMMENTS
The Dyson rank of a nonempty partition is its maximum part minus its number of parts. For this sequence, the rank of an empty partition is 0.
LINKS
Freeman J. Dyson, A new symmetry of partitions, Journal of Combinatorial Theory 7.1 (1969): 56-61.
FORMULA
G.f.: 1 + Sum_{i, j>0} q^(i*j) * ( (1+(-1)^(i+j))/2 + Sum_{k>0} q^k * q_binomial(k,i-2) * (1+(-1)^(i+j+k))/2 ). - John Tyler Rascoe, Apr 15 2024
a(n) ~ exp(Pi*sqrt(2*n/3)) / (8*n*sqrt(3)). - Vaclav Kotesovec, Apr 17 2024
EXAMPLE
The a(1) = 1 through a(9) = 18 partitions (empty column indicated by dot):
(1) . (3) (22) (5) (42) (7) (44) (9)
(21) (41) (321) (43) (62) (63)
(111) (311) (2211) (61) (332) (81)
(2111) (322) (521) (333)
(11111) (331) (2222) (522)
(511) (4211) (531)
(2221) (32111) (711)
(4111) (221111) (4221)
(31111) (4311)
(211111) (6111)
(1111111) (32211)
(33111)
(51111)
(222111)
(411111)
(3111111)
(21111111)
(111111111)
MAPLE
b:= proc(n, i, r) option remember; `if`(n=0, 1-max(0, r),
`if`(i<1, 0, b(n, i-1, r) +b(n-i, min(n-i, i), 1-
`if`(r<0, irem(i, 2), r))))
end:
a:= n-> b(n$2, -1):
seq(a(n), n=0..55); # Alois P. Heinz, Jan 22 2021
MATHEMATICA
Table[If[n==0, 1, Length[Select[IntegerPartitions[n], EvenQ[Max[#]-Length[#]]&]]], {n, 0, 30}]
(* Second program: *)
b[n_, i_, r_] := b[n, i, r] = If[n == 0, 1 - Max[0, r], If[i < 1, 0, b[n, i - 1, r] + b[n - i, Min[n - i, i], 1 - If[r < 0, Mod[i, 2], r]]]];
a[n_] := b[n, n, -1];
a /@ Range[0, 55] (* Jean-François Alcover, May 10 2021, after Alois P. Heinz *)
PROG
(PARI)
p_q(k) = {prod(j=1, k, 1-q^j); }
GB_q(N, M)= {if(N>=0 && M>=0, p_q(N+M)/(p_q(M)*p_q(N)), 0 ); }
A_q(N) = {my(q='q+O('q^N), g=1+sum(i=1, N, sum(j=1, N/i, q^(i*j) * ( ((1/2)*(1+(-1)^(i+j))) + sum(k=1, N-(i*j), ((q^k)*GB_q(k, i-2)) * ((1/2)*(1+(-1)^(i+j+k)))))))); Vec(g)}
A_q(50) \\ John Tyler Rascoe, Apr 15 2024
CROSSREFS
Note: Heinz numbers are given in parentheses below.
The positive case is A101708 (A340605).
The Heinz numbers of these partitions are A340602.
The odd version is A340692 (A340603).
- Rank -
A047993 counts partitions of rank 0 (A106529).
A072233 counts partitions by sum and length.
A101198 counts partitions of rank 1 (A325233).
A101707 counts partitions of odd positive rank (A340604).
A101708 counts partitions of even positive rank (A340605).
A257541 gives the rank of the partition with Heinz number n.
A340653 counts factorizations of rank 0.
- Even -
A024430 counts set partitions of even length.
A027187 counts partitions of even length (A028260).
A027187 (also) counts partitions of even maximum (A244990).
A034008 counts compositions of even length.
A035363 counts partitions into even parts (A066207).
A052841 counts ordered set partitions of even length.
A058696 counts partitions of even numbers (A300061).
A067661 counts strict partitions of even length (A030229).
A236913 counts even-length partitions of even numbers (A340784).
A339846 counts factorizations of even length.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jan 21 2021
STATUS
approved
a(n) = (A074206(n) + A008683(n))/2.
+10
25
1, 0, 0, 1, 0, 2, 0, 2, 1, 2, 0, 4, 0, 2, 2, 4, 0, 4, 0, 4, 2, 2, 0, 10, 1, 2, 2, 4, 0, 6, 0, 8, 2, 2, 2, 13, 0, 2, 2, 10, 0, 6, 0, 4, 4, 2, 0, 24, 1, 4, 2, 4, 0, 10, 2, 10, 2, 2, 0, 22, 0, 2, 4, 16, 2, 6, 0, 4, 2, 6, 0, 38, 0, 2, 4, 4, 2
OFFSET
1,6
COMMENTS
From Mats Granvik, May 25 2017: (Start)
A074206(n) = A002033(n-1) = a(n) + A174726(n).
A008683(n) = a(n) - A174726(n).
Let m = size of matrix a matrix T, and let T be defined as follows:
T(n,k) = if m = 1 then 1 else if mod(n, k) = 0 then if and(n = k, n = m) then 0 else 1 else if and(n = 1, k = m) then 1 else 0
a(n) is then the number of permutation matrices with a positive contribution in the determinant of matrix T. The determinant of T is equal to the Möbius function A008683, see Mathematica program below for how to compute the determinant.
A174726 is the number of permutation matrices with a negative contribution in the determinant of matrix T.
(End)
From Gus Wiseman, Jan 04 2021: (Start)
Also the number of ordered factorizations of n into an even number of factors > 1. The non-ordered case is A339846. For example, the a(n) factorizations for n = 12, 24, 30, 32, 36 are:
(2*6) (3*8) (5*6) (4*8) (4*9)
(3*4) (4*6) (6*5) (8*4) (6*6)
(4*3) (6*4) (10*3) (16*2) (9*4)
(6*2) (8*3) (15*2) (2*16) (12*3)
(12*2) (2*15) (2*2*2*4) (18*2)
(2*12) (3*10) (2*2*4*2) (2*18)
(2*2*2*3) (2*4*2*2) (3*12)
(2*2*3*2) (4*2*2*2) (2*2*3*3)
(2*3*2*2) (2*3*2*3)
(3*2*2*2) (2*3*3*2)
(3*2*2*3)
(3*2*3*2)
(3*3*2*2)
(End)
LINKS
FORMULA
a(n) = (Mobius transform of a(n)) + (Mobius transform of A174726). - Mats Granvik, Apr 04 2010
From Mats Granvik, May 25 2017: (Start)
This sequence is the Moebius transform of A074206.
a(n) = (A074206(n) + A008683(n))/2.
(End)
G.f. A(x) satisfies: A(x) = x + Sum_{i>=2} Sum_{j>=2} A(x^(i*j)). - Ilya Gutkovskiy, May 11 2019
MATHEMATICA
(* From Mats Granvik, May 25 2017: (Start) *)
Clear[t, nn]; nn = 77; t[1, 1] = 1; t[n_, k_] := t[n, k] = If[k == 1, Sum[t[n, k + i], {i, 1, n - 1}], If[Mod[n, k] == 0, t[n/k, 1], 0], 0]; Monitor[Table[Sum[If[Mod[n, k] == 0, MoebiusMu[k]*t[n/k, 1], 0], {k, 1, 77}], {n, 1, nn}], n]
(* The Möbius function as a determinant *) Table[Det[Table[Table[If[m == 1, 1, If[Mod[n, k] == 0, If[And[n == k, n == m], 0, 1], If[And[n == 1, k == m], 1, 0]]], {k, 1, m}], {n, 1, m}]], {m, 1, 42}]
(* (End) *)
ordfacs[n_]:=If[n<=1, {{}}, Join@@Table[(Prepend[#1, d]&)/@ordfacs[n/d], {d, Rest[Divisors[n]]}]];
Table[Length[Select[ordfacs[n], EvenQ@*Length]], {n, 100}] (* Gus Wiseman, Jan 04 2021 *)
CROSSREFS
The odd version is A174726.
The unordered version is A339846.
A001055 counts factorizations, with strict case A045778.
A058696 counts partitions of even numbers, ranked by A300061.
A074206 counts ordered factorizations, with strict case A254578.
A251683 counts ordered factorizations by product and length.
Other cases of even length:
- A024430 counts set partitions of even length.
- A027187 counts partitions of even length.
- A034008 counts compositions of even length.
- A052841 counts ordered set partitions of even length.
- A067661 counts strict partitions of even length.
- A332305 counts strict compositions of even length
KEYWORD
nonn
AUTHOR
Mats Granvik, Mar 28 2010
EXTENSIONS
References to A002033(n-1) changed to A074206(n) by Antti Karttunen, Nov 23 2024
STATUS
approved

Search completed in 0.028 seconds