cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 35 results. Next

A027187 Number of partitions of n into an even number of parts.

Original entry on oeis.org

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

Views

Author

Keywords

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

Examples

			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)
		

References

  • N. J. Fine, Basic Hypergeometric Series and Applications, Amer. Math. Soc., 1988; See p. 8, (7.323) and p. 39, Example 7.

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.

Programs

  • 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 *)
  • 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
    my(q='q+O('q^66)); Vec( (1/eta(q)+eta(q)/eta(q^2))/2 ) \\ Joerg Arndt, Mar 23 2014

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^(2*n)/(q; q)_{2*n}
= ((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^(2*n+1)/(q; q){2*n+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^(2*k)), q^k/(1-q^(2*k)) ; q^k/(1-q^(2*k)), 1/(1-q^(2*k)) ]
= [ 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

Extensions

Offset changed to 0 by Michael Somos, Jul 24 2012

A339846 Number of even-length factorizations of n into factors > 1.

Original entry on oeis.org

1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 2, 0, 1, 1, 3, 0, 2, 0, 2, 1, 1, 0, 4, 1, 1, 1, 2, 0, 3, 0, 3, 1, 1, 1, 5, 0, 1, 1, 4, 0, 3, 0, 2, 2, 1, 0, 6, 1, 2, 1, 2, 0, 4, 1, 4, 1, 1, 0, 6, 0, 1, 2, 6, 1, 3, 0, 2, 1, 3, 0, 8, 0, 1, 2, 2, 1, 3, 0, 6, 3, 1, 0, 6, 1, 1, 1, 4, 0, 6, 1, 2, 1, 1, 1, 10, 0, 2, 2, 5, 0, 3, 0, 4, 3
Offset: 1

Views

Author

Gus Wiseman, Dec 28 2020

Keywords

Examples

			The a(n) factorizations for n = 12, 16, 24, 36, 48, 72, 96, 120:
  2*6  2*8      3*8      4*9      6*8      8*9      2*48         2*60
  3*4  4*4      4*6      6*6      2*24     2*36     3*32         3*40
       2*2*2*2  2*12     2*18     3*16     3*24     4*24         4*30
                2*2*2*3  3*12     4*12     4*18     6*16         5*24
                         2*2*3*3  2*2*2*6  6*12     8*12         6*20
                                  2*2*3*4  2*2*2*9  2*2*3*8      8*15
                                           2*2*3*6  2*2*4*6      10*12
                                           2*3*3*4  2*3*4*4      2*2*5*6
                                                    2*2*2*12     2*3*4*5
                                                    2*2*2*2*2*3  2*2*2*15
                                                                 2*2*3*10
		

Crossrefs

The case of set partitions (or n squarefree) is A024430.
The case of partitions (or prime powers) is A027187.
The ordered version is A174725, odd: A174726.
The odd-length factorizations are counted by A339890.
A001055 counts factorizations, with strict case A045778.
A001358 lists semiprimes, with squarefree case A006881.
A027187 counts partitions of even length, ranked by A028260.
A058696 counts partitions of even numbers, ranked by A300061.
A316439 counts factorizations by product and length.
A340102 counts odd-length factorizations into odd factors.

Programs

  • Maple
    g:= proc(n, k, t) option remember; `if`(n>k, 0, t)+
          `if`(isprime(n), 0, add(`if`(d>k, 0, g(n/d, d, 1-t)),
              d=numtheory[divisors](n) minus {1, n}))
        end:
    a:= n-> `if`(n=1, 1, g(n$2, 0)):
    seq(a(n), n=1..100);  # Alois P. Heinz, Dec 30 2020
  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    Table[Length[Select[facs[n],EvenQ@Length[#]&]],{n,100}]
  • PARI
    A339846(n, m=n, e=1) = if(1==n, e, sumdiv(n, d, if((d>1)&&(d<=m), A339846(n/d, d, 1-e)))); \\ Antti Karttunen, Oct 22 2023

Formula

a(n) + A339890(n) = A001055(n).

Extensions

Data section extended up to a(105) by Antti Karttunen, Oct 22 2023

A067661 Number of partitions of n into distinct parts such that number of parts is even.

Original entry on oeis.org

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

Views

Author

Naohiro Nomoto, Feb 23 2002

Keywords

Comments

Ramanujan theta functions: phi(q) (A000122), chi(q) (A000700).

Examples

			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)
		

References

  • B. C. Berndt, Ramanujan's Notebooks Part III, Springer-Verlag, see p. 18 Entry 9 Corollary (2).

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.

Programs

  • 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 *)
  • 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

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)

A024429 Expansion of e.g.f. sinh(exp(x)-1).

Original entry on oeis.org

0, 1, 1, 2, 7, 27, 106, 443, 2045, 10440, 57781, 340375, 2115664, 13847485, 95394573, 690495874, 5235101739, 41428115543, 341177640610, 2917641580783, 25866987547865, 237421321934176, 2252995117706961, 22073206655954547, 222971522853648704, 2319379362420267753
Offset: 0

Views

Author

Keywords

Comments

Number of partitions of an n-element set into an odd number of classes. - Peter Luschny, Apr 25 2011
Let A(0) = 1, B(0) = 0; A(n+1) = Sum_{k=0..n} binomial(n,k)*B(k), B(n+1) = Sum_{k=0..n} binomial(n,k)*A(k); entry gives B sequence (cf. A024430).

Examples

			G.f. = x + x^2 + 2*x^3 + 7*x^4 + 27*x^5 + 106*x^6 + 443*x^7 + 2045*x^8 + ...
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 226, 4th line of table.

Crossrefs

Programs

  • GAP
    List([0..25], n-> Sum([0..Int(n/2)], k-> Stirling2(n,2*k+1)) ); # G. C. Greubel, Oct 09 2019
  • Magma
    a:= func< n | (&+[StirlingSecond(n,2*k+1): k in [0..Floor(n/2)]]) >;
    [a(n): n in [0..25]]; // G. C. Greubel, Oct 09 2019
    
  • Maple
    b:= proc(n, t) option remember; `if`(n=0, t, add(
           b(n-j, 1-t)*binomial(n-1, j-1), j=1..n))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..28);  # Alois P. Heinz, Jan 15 2018
    with(combinat); seq((bell(n) - BellB(n, -1))/2, n = 0..25); # G. C. Greubel, Oct 09 2019
  • Mathematica
    CoefficientList[Series[Sinh[E^x-1], {x, 0, 20}], x] * Range[0, 20]! (* Vaclav Kotesovec, Aug 04 2014 *)
    Table[(BellB[n] - BellB[n, -1])/2, {n, 0, 20}] (* Vladimir Reshetnikov, Nov 01 2015 *)
  • PARI
    x='x+O('x^50); concat([0], Vec(serlaplace(sinh(exp(x)-1)))) \\ G. C. Greubel, Nov 12 2017
    
  • Sage
    def A024429(n) :
        return add(stirling_number2(n,i) for i in range(1,n+n%2,2))
    # Peter Luschny, Feb 28 2012
    

Formula

S(n,1) + S(n,3) + ... + S(n,2k+1), where k = [ (n-1)/2 ] and S(i,j) are Stirling numbers of second kind.
E.g.f.: sinh(exp(x)-1). - N. J. A. Sloane, Jan 28 2001
a(n) = (A000110(n) - A000587(n)) / 2. - Peter Luschny, Apr 25 2011
G.f.: x*G(0) where G(k) = 1 - x*(2*k+1)/((2*x*k+x-1) - x*(2*x*k+x-1)/(x - (2*k+1)*(2*x*k+2*x-1)/G(k+1) )); (recursively defined continued fraction). - Sergei N. Gladkovskii, Jan 06 2013
G.f.: x*G(0)/(1+x) where G(k) = 1 - 2*x*(k+1)/((2*x*k+x-1) - x*(2*x*k+x-1)/(x - 2*(k+1)*(2*x*k+2*x-1)/G(k+1) )); (recursively defined continued fraction). - Sergei N. Gladkovskii, Jan 06 2013
G.f.: -x*(1+x)*Sum_{k>=0} x^(2*k)/((2*x*k+x-1)*Product_{p=0..k} (2*x*p-1)*(2*x*p-x-1)). - Sergei N. Gladkovskii, Jan 06 2013
G.f.: Sum_{k>=0} x^(2*k+1)/(Product_{i=0..2*k+1} 1-i*x). - Sergei N. Gladkovskii, Jan 06 2013
a(n) ~ n^n / (2 * (LambertW(n))^n * exp(n+1-n/LambertW(n)) * sqrt(1+LambertW(n))). - Vaclav Kotesovec, Aug 04 2014

Extensions

Description changed by N. J. A. Sloane, Sep 05 2006

A340601 Number of integer partitions of n of even rank.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jan 21 2021

Keywords

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.

Examples

			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)
		

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.

Programs

  • 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 *)
  • 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

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

A174725 a(n) = (A074206(n) + A008683(n))/2.

Original entry on oeis.org

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

Views

Author

Mats Granvik, Mar 28 2010

Keywords

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)

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

Programs

  • 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 *)

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

Extensions

References to A002033(n-1) changed to A074206(n) by Antti Karttunen, Nov 23 2024

A174726 a(n) = (A002033(n-1) - A008683(n))/2.

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4, 1, 4, 1, 1, 1, 10, 1, 1, 2, 4, 1, 7, 1, 8, 1, 1, 1, 13, 1, 1, 1, 10, 1, 7, 1, 4, 4, 1, 1, 24, 1, 4, 1, 4, 1, 10, 1, 10, 1, 1, 1, 22, 1, 1, 4, 16, 1, 7, 1, 4, 1, 7, 1, 38, 1, 1, 4, 4, 1
Offset: 1

Views

Author

Mats Granvik, Mar 28 2010

Keywords

Comments

a(n) is the number of permutation matrices with a negative contribution to the determinant that is the Möbius function. See A174725 for how the determinant is defined. - Mats Granvik, May 26 2017
From Gus Wiseman, Jan 04 2021: (Start)
Also the number of ordered factorizations of n into an odd number of factors > 1. The unordered case is A339890. For example, the a(n) factorizations for n = 8, 12, 24, 30, 32, 36 are:
(8) (12) (24) (30) (32) (36)
(2*2*2) (2*2*3) (2*2*6) (2*3*5) (2*2*8) (2*2*9)
(2*3*2) (2*3*4) (2*5*3) (2*4*4) (2*3*6)
(3*2*2) (2*4*3) (3*2*5) (2*8*2) (2*6*3)
(2*6*2) (3*5*2) (4*2*4) (2*9*2)
(3*2*4) (5*2*3) (4*4*2) (3*2*6)
(3*4*2) (5*3*2) (8*2*2) (3*3*4)
(4*2*3) (2*2*2*2*2) (3*4*3)
(4*3*2) (3*6*2)
(6*2*2) (4*3*3)
(6*2*3)
(6*3*2)
(9*2*2)
(End)

Crossrefs

The even version is A174725.
The unordered case is A339890, with even version A339846.
A001055 counts factorizations, with strict case A045778.
A074206 counts ordered factorizations, with strict case A254578.
A251683 counts ordered factorizations by product and length.
A340102 counts odd-length factorizations into odd factors.
Other cases of odd length:
- A024429 counts set partitions of odd length.
- A027193 counts partitions of odd length.
- A067659 counts strict partitions of odd length.
- A089677 counts ordered set partitions of odd length.
- A166444 counts compositions of odd length.
- A332304 counts strict compositions of odd length.

Programs

  • Mathematica
    ordfacs[n_]:=If[n<=1,{{}},Join@@Table[(Prepend[#1,d]&)/@ordfacs[n/d],{d,Rest[Divisors[n]]}]];
    Table[Length[Select[ordfacs[n],OddQ@*Length]],{n,100}] (* Gus Wiseman, Jan 04 2021 *)

Formula

a(n) = (A002033(n-1) - A008683(n))/2. - Mats Granvik, May 26 2017
For n > 0, a(n) + A174725(n) = A074206(n). - Gus Wiseman, Jan 04 2021

A340602 Heinz numbers of integer partitions of even rank.

Original entry on oeis.org

1, 2, 5, 6, 8, 9, 11, 14, 17, 20, 21, 23, 24, 26, 30, 31, 32, 35, 36, 38, 39, 41, 44, 45, 47, 49, 50, 54, 56, 57, 58, 59, 65, 66, 67, 68, 73, 74, 75, 80, 81, 83, 84, 86, 87, 91, 92, 95, 96, 97, 99, 102, 103, 104, 106, 109, 110, 111, 120, 122, 124, 125, 126, 127
Offset: 1

Views

Author

Gus Wiseman, Jan 21 2021

Keywords

Comments

The Dyson rank of a nonempty partition is its maximum part minus its length. The rank of an empty partition is 0.
The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). This gives a bijective correspondence between positive integers and integer partitions.

Examples

			The sequence of partitions with their Heinz numbers begins:
     1: ()           31: (11)           58: (10,1)
     2: (1)          32: (1,1,1,1,1)    59: (17)
     5: (3)          35: (4,3)          65: (6,3)
     6: (2,1)        36: (2,2,1,1)      66: (5,2,1)
     8: (1,1,1)      38: (8,1)          67: (19)
     9: (2,2)        39: (6,2)          68: (7,1,1)
    11: (5)          41: (13)           73: (21)
    14: (4,1)        44: (5,1,1)        74: (12,1)
    17: (7)          45: (3,2,2)        75: (3,3,2)
    20: (3,1,1)      47: (15)           80: (3,1,1,1,1)
    21: (4,2)        49: (4,4)          81: (2,2,2,2)
    23: (9)          50: (3,3,1)        83: (23)
    24: (2,1,1,1)    54: (2,2,2,1)      84: (4,2,1,1)
    26: (6,1)        56: (4,1,1,1)      86: (14,1)
    30: (3,2,1)      57: (8,2)          87: (10,2)
		

Crossrefs

Taking only length gives A001222.
Taking only maximum part gives A061395.
These partitions are counted by A340601.
The complement is A340603.
The case of positive rank is A340605.
- Rank -
A047993 counts partitions of rank 0 (A106529).
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.
A324516 counts partitions with rank = maximum minus minimum part (A324515).
A340653 counts factorizations of rank 0.
A340692 counts partitions of odd rank (A340603).
- 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.

Programs

  • Mathematica
    Select[Range[100],EvenQ[PrimePi[FactorInteger[#][[-1,1]]]-PrimeOmega[#]]&]

Formula

Either n = 1 or A061395(n) - A001222(n) is even.

A143815 Let A(0)=1, B(0)=0 and C(0)=0. Let B(n+1) = Sum_{k = 0..n} binomial(n,k)*A(k), C(n+1) = Sum_{k = 0..n} binomial(n,k)*B(k) and A(n+1) = Sum_{k = 0..n} binomial(n,k)*C(k). This entry gives the sequence A(n).

Original entry on oeis.org

1, 0, 0, 1, 6, 25, 91, 322, 1232, 5672, 32202, 209143, 1432454, 9942517, 69363840, 490303335, 3565609732, 27118060170, 218183781871, 1861370544934, 16729411124821, 156706028787827, 1514442896327792, 14999698898942772, 151838974745743228, 1571513300578303070
Offset: 0

Views

Author

Peter Bala, Sep 03 2008

Keywords

Comments

Compare with A024429 and A024430.
This sequence and its companion sequences B(n) = A143816(n) and C(n) = A143817(n) may be viewed as generalizations of the Bell numbers A000110. Define a sequence R(n) of real numbers by R(n) = Sum_{k >= 0} (3*k)^n/(3*k)! for n = 0, 1, 2, .... It is easy to verify that this sequence satisfies the recurrence relation u(n+3) = 3*u(n+2) - 2*u(n+1) + Sum_{i = 0..n} binomial(n, i)*3^(n-i)*u(i). Hence R(n) is an integral linear combination of R(0), R(1) and R(2). Some examples are given below.
To find the precise form of the linear relation define two other sequences of real numbers by S(n) = Sum_{k >= 0} (3*k+1)^n/(3*k+1)! and T(n) = Sum_{k >= 0} (3*k+2)^n/(3*k+2)! for n = 0, 1, 2, .... Both S(n) and T(n) satisfy the above recurrence. Then by means of the identities S(n+1) = Sum_{i = 0..n} binomial(n, i)*R(i), T(n+1) = Sum_{i = 0..n} binomial(n, i)*S(i) and R(n+1) = Sum_{i = 0..n} binomial(n, i)*T(i) we obtain the result R(n) = A(n)*R(0) + (B(n) - C(n))*R(1) + C(n)*R(2) = A(n)*R(0) + B(n)*R(1) + C(n)*(R(2) - R(1)) (with corresponding expressions for S(n) and T(n)). This generalizes the Dobinski's relation for the Bell numbers Sum_{k >= 0} k^n/k! = A000110(n)*exp(1).
Some examples of R(n) as a linear combination of R(0), R(1) and R(2) - R(1) are given below. The decimal expansions of R(0) = 1 + 1/3! + 1/6! + 1/9! + ..., R(2) - R(1) = 1/1! + 1/4! + 1/7! + ... and R(1) = 1/2! + 1/5! + 1/8! + ... may be found in A143819, A143820 and A143821 respectively. Compare with A143628 through A143631.
For n > 0, the number of partitions of {1,2,...,n} into 3,6,9,... classes. - Geoffrey Critzer, Mar 05 2010

Examples

			R(n) as a linear combination of R(i), i = 0..2.
  ==================================
  R(n)  |     R(0)    R(1)    R(2)
  ==================================
  R(3)  |       1      -2       3
  R(4)  |       6      -5       7
  R(5)  |      25      -5      16
  R(6)  |      91      20      46
  R(7)  |     322     149     203
  R(8)  |    1232     552    1178
  R(9)  |    5672     991    7242
  R(10) |   32202   -3799   43786
  ...
Column 2 of the above table is A143818.
R(n) as a linear combination of R(0),R(1) and R(2) - R(1).
  =====================================
  R(n)  |     R(0)     R(1)   R(2)-R(1)
  =====================================
  R(3)  |       1        1        3
  R(4)  |       6        2        7
  R(5)  |      25       11       16
  R(6)  |      91       66       46
  R(7)  |     322      352      203
  R(8)  |    1232     1730     1178
  R(9)  |    5672     8233     7242
  R(10) |   32202    39987    43786
  ...
		

Crossrefs

Programs

  • Maple
    # (1)
    M:=24: a:=array(0..100): b:=array(0..100): c:=array(0..100):
    a[0]:=1: b[0]:=0: c[0]:=0:
    for n from 1 to M do
    b[n]:=add(binomial(n-1,k)*a[k], k=0..n-1);
    c[n]:=add(binomial(n-1,k)*b[k], k=0..n-1);
    a[n]:=add(binomial(n-1,k)*c[k], k=0..n-1);
    end do:
    A143815:=[seq(a[n], n=0..M)];
    # (2)
    seq(add(Stirling2(n,3*i),i = 0..floor(n/3)), n = 0..24);
    # third Maple program:
    b:= proc(n, t) option remember; `if`(n=0, irem(t, 2),
          add(b(n-j, irem(t+1, 3))*binomial(n-1, j-1), j=1..n))
        end:
    a:= n-> b(n, 1):
    seq(a(n), n=0..25);  # Alois P. Heinz, Feb 20 2018
  • Mathematica
    a = Exp[x] - 1; f[x_] := 1/3 (E^x + 2 E^(-x/2) Cos[(Sqrt[3] x)/2]); CoefficientList[Series[f[a], {x, 0, 25}], x]*Table[n!, {n, 0, 25}] (* Geoffrey Critzer, Mar 05 2010 *)
  • PARI
    Bell_poly(n, x) = exp(-x)*suminf(k=0, k^n*x^k/k!);
    a(n) = my(w=(-1+sqrt(3)*I)/2); round(Bell_poly(n, 1)+Bell_poly(n, w)+Bell_poly(n, w^2))/3; \\ Seiichi Manyama, Oct 13 2022

Formula

a(n) = Sum_{k = 0..floor(n/3)} Stirling2(n, 3*k).
Let w = exp(2*Pi*i/3) and set F(x) = (exp(x) + exp(w*x) + exp(w^2*x))/3 = 1 + x^3/3! + x^6/6! + ... . Then the e.g.f. for the sequence is F(exp(x) - 1).
A143815(n) + A143816(n) + A143817(n) = Bell(n).
E.g.f. is B(A(x)) where A(x) = exp(x) - 1 and B(x) = (1/3)*(exp(x) + 2*exp(-x/2)*cos(sqrt(3)*x/2)). - Geoffrey Critzer, Mar 05 2010
a(n) = ( Bell_n(1) + Bell_n(w) + Bell_n(w^2) )/3, where Bell_n(x) is n-th Bell polynomial and w = exp(2*Pi*i/3). - Seiichi Manyama, Oct 13 2022
a(n) ~ n^n / (3 * (LambertW(n))^n * exp(n+1-n/LambertW(n)) * sqrt(1+LambertW(n))). - Vaclav Kotesovec, Jun 10 2025

A121867 Let A(0) = 1, B(0) = 0; A(n+1) = Sum_{k=0..n} binomial(n,k)*B(k), B(n+1) = Sum_{k=0..n} -binomial(n,k)*A(k); entry gives A sequence (cf. A121868).

Original entry on oeis.org

1, 0, -1, -3, -6, -5, 33, 266, 1309, 4905, 11516, -22935, -556875, -4932512, -32889885, -174282151, -612400262, 907955295, 45283256165, 573855673458, 5397236838345, 41604258561397, 250231901787780, 756793798761989, -8425656230853383, -213091420659985440, -2990113204010882473
Offset: 0

Views

Author

N. J. A. Sloane, Sep 05 2006

Keywords

Comments

Stirling transform of A056594.

Examples

			From _Peter Bala_, Aug 28 2008: (Start)
E_2(k) as linear combination of E_2(i), i = 0..1.
============================
..E_2(k)..|...E_2(0)..E_2(1)
============================
..E_2(2)..|....-1.......1...
..E_2(3)..|....-3.......0...
..E_2(4)..|....-6......-5...
..E_2(5)..|....-5.....-23...
..E_2(6)..|....33.....-74...
..E_2(7)..|...266....-161...
..E_2(8)..|..1309......57...
..E_2(9)..|..4905....3466...
...
(End)
		

Crossrefs

Programs

  • GAP
    List([0..30], n-> Sum([0..Int(n/2)], k-> (-1)^k*Stirling2(n,2*k)) ); # G. C. Greubel, Oct 09 2019
  • Magma
    [(&+[(-1)^k*StirlingSecond(n,2*k): k in [0..Floor(n/2)]]): n in [0..30]]; // G. C. Greubel, Oct 09 2019
    
  • Maple
    # Maple code for A024430, A024429, A121867, A121868.
    M:=30; a:=array(0..100); b:=array(0..100); c:=array(0..100); d:=array(0..100); a[0]:=1; b[0]:=0; c[0]:=1; d[0]:=0;
    for n from 1 to M do a[n]:=add(binomial(n-1,k)*b[k], k=0..n-1); b[n]:=add(binomial(n-1,k)*a[k], k=0..n-1); c[n]:=add(binomial(n-1,k)*d[k], k=0..n-1); d[n]:=-add(binomial(n-1,k)*c[k], k=0..n-1); od: ta:=[seq(a[n],n=0..M)]; tb:=[seq(b[n],n=0..M)]; tc:=[seq(c[n],n=0..M)]; td:=[seq(d[n],n=0..M)];
    # Code based on Stirling transform:
    stirtr:= proc(p) proc(n) option remember;
                add(p(k) *Stirling2(n,k), k=0..n) end
             end:
    a:= stirtr(n-> (I^n + (-I)^n)/2):
    seq(a(n), n=0..30);  # Alois P. Heinz, Jan 29 2011
  • Mathematica
    a[n_] := (BellB[n, -I] + BellB[n, I])/2; Table[a[n], {n, 0, 26}] (* Jean-François Alcover, Mar 06 2013, after Alois P. Heinz *)
  • PARI
    a(n) = sum(k=0,n\2, (-1)^k*stirling(n,2*k,2));
    vector(30, n, a(n-1)) \\ G. C. Greubel, Oct 09 2019
    
  • Sage
    [sum((-1)^k*stirling_number2(n,2*k) for k in (0..floor(n/2))) for n in (0..30)] # G. C. Greubel, Oct 09 2019
    

Formula

From Peter Bala, Aug 28 2008: (Start)
This sequence and its companion A121868 are related to the pair of constants cos(1) + sin(1) and cos(1) - sin(1) and may be viewed as generalizations of the Uppuluri-Carpenter numbers (complementary Bell numbers) A000587. Define E_2(k) = Sum_{n >= 0} (-1)^floor(n/2) * n^k/n! for k = 0,1,2,... . Then E_2(0) = cos(1) + sin(1) and E_2(1) = cos(1) - sin(1). It is easy to see that E_2(k+2) = E_2(k+1) - Sum_{i = 0..k} 2^i*binomial(k,i)*E_2(k-i) for k >= 0. Hence E_2(k) is an integral linear combination of E_2(0) and E_2(1) (a Dobinski-type relation). For example, E_2(2) = - E_2(0) + E_2(1), E_2(3) = -3*E_2(0) and E_2(4) = - 6*E_2(0) - 5*E_2(1). More examples are given below.
To find the precise result, show F(k) := Sum_{n >= 0} (-1)^floor((n+1)/2)*n^k/n! satisfies the above recurrence with F(0) = E_2(1) and F(1) = -E_2(0) and then use the identity Sum_{i = 0..k} binomial(k,i)*E_2(i) = -F(k+1) to obtain E_2(k) = A121867(k) * E_2(0) - A121868(k) * E_2(1). For similar results see A143628. The decimal expansions of E_2(0) and E_2(1) are given in A143623 and A143624 respectively. (End)
E.g.f.: A(x) = cos(exp(x)-1).
a(n) = Sum_{k=0..floor(n/2)} stirling2(n,2*k)*(-1)^(k). - Vladimir Kruchinin, Jan 29 2011
Showing 1-10 of 35 results. Next