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 135 results. Next

A088218 Total number of leaves in all rooted ordered trees with n edges.

Original entry on oeis.org

1, 1, 3, 10, 35, 126, 462, 1716, 6435, 24310, 92378, 352716, 1352078, 5200300, 20058300, 77558760, 300540195, 1166803110, 4537567650, 17672631900, 68923264410, 269128937220, 1052049481860, 4116715363800, 16123801841550, 63205303218876, 247959266474052
Offset: 0

Views

Author

Michael Somos, Sep 24 2003

Keywords

Comments

Essentially the same as A001700, which has more information.
Note that the unique rooted tree with no edges has no leaves, so a(0)=1 is by convention. - Michael Somos, Jul 30 2011
Number of ordered partitions of n into n parts, allowing zeros (cf. A097070) is binomial(2*n-1,n) = a(n) = essentially A001700. - Vladeta Jovovic, Sep 15 2004
Hankel transform is A000027; example: Det([1,1,3,10;1,3,10,35;3,10,35,126; 10,35,126,462]) = 4. - Philippe Deléham, Apr 13 2007
a(n) is the number of functions f:[n]->[n] such that for all x,y in [n] if xA045992(n). - Geoffrey Critzer, Apr 02 2009
Hankel transform of the aeration of this sequence is A000027 doubled: 1,1,2,2,3,3,... - Paul Barry, Sep 26 2009
The Fi1 and Fi2 triangle sums of A039599 are given by the terms of this sequence. For the definitions of these triangle sums see A180662. - Johannes W. Meijer, Apr 20 2011
Alternating row sums of Riordan triangle A094527. See the Philippe Deléham formula. - Wolfdieter Lang, Nov 22 2012
(-2)*a(n) is the Z-sequence for the Riordan triangle A110162. For the notion of Z- and A-sequences for Riordan arrays see the W. Lang link under A006232 with details and references. - Wolfdieter Lang, Nov 22 2012
From Gus Wiseman, Jun 27 2021: (Start)
Also the number of integer compositions of 2n with alternating (or reverse-alternating) sum 0 (ranked by A344619). This is equivalent to Ran Pan's comment at A001700. For example, the a(0) = 1 through a(3) = 10 compositions are:
() (11) (22) (33)
(121) (132)
(1111) (231)
(1122)
(1221)
(2112)
(2211)
(11121)
(12111)
(111111)
For n > 0, a(n) is also the number of integer compositions of 2n with alternating sum 2.
(End)
Number of terms in the expansion of (x_1+x_2+...+x_n)^n. - César Eliud Lozada, Jan 08 2022

Examples

			G.f. = 1 + x + 3*x^2 + 10*x^3 + 35*x^4 + 126*x^5 + 462*x^6 + 1716*x^7 + ...
The five rooted ordered trees with 3 edges have 10 leaves.
..x........................
..o..x.x..x......x.........
..o...o...o.x..x.o..x.x.x..
..r...r....r....r.....r....
		

References

  • L. W. Shapiro and C. J. Wang, Generating identities via 2 X 2 matrices, Congressus Numerantium, 205 (2010), 33-46.

Crossrefs

Same as A001700 modulo initial term and offset.
First differences are A024718.
Main diagonal of A071919 and of A305161.
A signed version is A110556.
A000041 counts partitions of 2n with alternating sum 0, ranked by A000290.
A003242 counts anti-run compositions.
A025047 counts wiggly compositions (ascend: A025048, descend: A025049).
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A106356 counts compositions by number of maximal anti-runs.
A124754 gives the alternating sum of standard compositions.
A345197 counts compositions by sum, length, and alternating sum.
Compositions of n, 2n, or 2n+1 with alternating/reverse-alternating sum k:
- k = 0: counted by A088218 (this sequence), ranked by A344619/A344619.
- k = 1: counted by A000984, ranked by A345909/A345911.
- k = -1: counted by A001791, ranked by A345910/A345912.
- k = 2: counted by A088218 (this sequence), ranked by A345925/A345922.
- k = -2: counted by A002054, ranked by A345924/A345923.
- k >= 0: counted by A116406, ranked by A345913/A345914.
- k <= 0: counted by A058622(n-1), ranked by A345915/A345916.
- k > 0: counted by A027306, ranked by A345917/A345918.
- k < 0: counted by A294175, ranked by A345919/A345920.
- k != 0: counted by A058622, ranked by A345921/A345921.
- k even: counted by A081294, ranked by A053754/A053754.
- k odd: counted by A000302, ranked by A053738/A053738.

Programs

  • Magma
    [Binomial(2*n-1, n): n in [0..30]]; // Vincenzo Librandi, Aug 07 2014
  • Maple
    seq(binomial(2*n-1, n),n=0..24); # Peter Luschny, Sep 22 2014
  • Mathematica
    a[ n_] := SeriesCoefficient[(1 - x)^-n, {x, 0, n}];
    c = (1 - (1 - 4 x)^(1/2))/(2 x);CoefficientList[Series[1/(1-(c-1)),{x,0,20}],x] (* Geoffrey Critzer, Dec 02 2010 *)
    Table[Binomial[2 n - 1, n], {n, 0, 20}] (* Vincenzo Librandi, Aug 07 2014 *)
    a[ n_] := If[ n < 0, 0, With[ {m = 2 n}, m! SeriesCoefficient[ (1 + BesselI[0, 2 x]) / 2, {x, 0, m}]]]; (* Michael Somos, Nov 22 2014 *)
  • PARI
    {a(n) = sum( i=0, n, binomial(n+i-2,i))};
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff( (1 + 1 / sqrt(1 - 4*x + x * O(x^n))) / 2, n))};
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff( 1 / (1 - x + x * O(x^n))^n, n))};
    
  • PARI
    {a(n) = if( n<0, 0, binomial( 2*n - 1, n))};
    
  • PARI
    {a(n) = if( n<1, n==0, polcoeff( subst((1 - x) / (1 - 2*x), x, serreverse( x - x^2 + x * O(x^n))), n))};
    
  • Sage
    def A088218(n):
        return rising_factorial(n,n)/falling_factorial(n,n)
    [A088218(n) for n in (0..24)]  # Peter Luschny, Nov 21 2012
    

Formula

G.f.: (1 + 1 / sqrt(1 - 4*x)) / 2.
a(n) = binomial(2*n - 1, n).
a(n) = (n+1)*A000108(n)/2, n>=1. - B. Dubalski (dubalski(AT)atr.bydgoszcz.pl), Feb 05 2002 (in A060150)
a(n) = (0^n + C(2n, n))/2. - Paul Barry, May 21 2004
a(n) is the coefficient of x^n in 1 / (1 - x)^n and also the sum of the first n coefficients of 1 / (1 - x)^n. Given B(x) with the property that the coefficient of x^n in B(x)^n equals the sum of the first n coefficients of B(x)^n, then B(x) = B(0) / (1 - x).
G.f.: 1 / (2 - C(x)) = (1 - x*C(x))/sqrt(1-4*x) where C(x) is g.f. for Catalan numbers A000108. Second equation added by Wolfdieter Lang, Nov 22 2012.
From Paul Barry, Nov 02 2004: (Start)
a(n) = Sum_{k=0..n} binomial(2*n, k)*cos((n-k)*Pi);
a(n) = Sum_{k=0..n} binomial(n, (n-k)/2)*(1+(-1)^(n-k))*cos(k*Pi/2)/2 (with interpolated zeros);
a(n) = Sum_{k=0..floor(n/2)} binomial(n, k)*cos((n-2*k)*Pi/2) (with interpolated zeros); (End)
a(n) = A110556(n)*(-1)^n, central terms in triangle A110555. - Reinhard Zumkeller, Jul 27 2005
a(n) = Sum_{0<=k<=n} A094527(n,k)*(-1)^k. - Philippe Deléham, Mar 14 2007
From Paul Barry, Mar 29 2010: (Start)
G.f.: 1/(1-x/(1-2x/(1-(1/2)x/(1-(3/2)x/(1-(2/3)x/(1-(4/3)x/(1-(3/4)x/(1-(5/4)x/(1-... (continued fraction);
E.g.f.: (of aerated sequence) (1 + Bessel_I(0, 2*x))/2. (End)
a(n + 1) = A001700(n). a(n) = A024718(n) - A024718(n - 1).
E.g.f.: E(x) = 1+x/(G(0)-2*x) ; G(k) = (k+1)^2+2*x*(2*k+1)-2*x*(2*k+3)*((k+1)^2)/G(k+1); (continued fraction). - Sergei N. Gladkovskii, Dec 21 2011
a(n) = Sum_{k=0..n}(-1)^k*binomial(2*n,n+k). - Mircea Merca, Jan 28 2012
a(n) = rf(n,n)/ff(n,n), where rf is the rising factorial and ff the falling factorial. - Peter Luschny, Nov 21 2012
D-finite with recurrence: n*a(n) +2*(-2*n+1)*a(n-1) = 0. - R. J. Mathar, Dec 04 2012
a(n) = hypergeom([1-n,-n],[1],1). - Peter Luschny, Sep 22 2014
G.f.: 1 + x/W(0), where W(k) = 4*k+1 - (4*k+3)*x/(1 - (4*k+1)*x/(4*k+3 - (4*k+5)*x/(1 - (4*k+3)*x/W(k+1) ))) ; (continued fraction). - Sergei N. Gladkovskii, Nov 13 2014
a(n) = A000984(n) + A001791(n). - Gus Wiseman, Jun 28 2021
E.g.f.: (1 + exp(2*x) * BesselI(0,2*x)) / 2. - Ilya Gutkovskiy, Nov 03 2021
From Amiram Eldar, Mar 12 2023: (Start)
Sum_{n>=0} 1/a(n) = 5/3 + 4*Pi/(9*sqrt(3)).
Sum_{n>=0} (-1)^n/a(n) = 3/5 - 8*log(phi)/(5*sqrt(5)), where phi is the golden ratio (A001622). (End)
a(n) ~ 2^(2*n-1)/sqrt(n*Pi). - Stefano Spezia, Apr 17 2024

A035363 Number of partitions of n into even parts.

Original entry on oeis.org

1, 0, 1, 0, 2, 0, 3, 0, 5, 0, 7, 0, 11, 0, 15, 0, 22, 0, 30, 0, 42, 0, 56, 0, 77, 0, 101, 0, 135, 0, 176, 0, 231, 0, 297, 0, 385, 0, 490, 0, 627, 0, 792, 0, 1002, 0, 1255, 0, 1575, 0, 1958, 0, 2436, 0, 3010, 0, 3718, 0, 4565, 0, 5604, 0, 6842, 0, 8349, 0, 10143, 0, 12310, 0
Offset: 0

Views

Author

Keywords

Comments

Convolved with A036469 = A000070. - Gary W. Adamson, Jun 09 2009
Note that these partitions are located in the head of the last section of the set of partitions of n (see A135010). - Omar E. Pol, Nov 20 2009
Number of symmetric unimodal compositions of n+2 where the maximal part appears twice, see example. Also number of symmetric unimodal compositions of n where the maximal part appears an even number of times. - Joerg Arndt, Jun 11 2013
Number of partitions of n having parts of even multiplicity. These are the conjugates of the partitions from the definition. Example: a(8)=5 because we have [4,4],[3,3,1,1],[2,2,2,2],[2,2,1,1,1,1], and [1,1,1,1,1,1,1,1]. - Emeric Deutsch, Jan 27 2016
From Gus Wiseman, May 22 2021: (Start)
The Heinz numbers of the conjugate partitions described in Emeric Deutsch's comment above are given by A000290.
For n > 1, also the number of integer partitions of n-1 whose only odd part is the smallest. The Heinz numbers of these partitions are given by A341446. For example, the a(2) = 1 through a(14) = 15 partitions (empty columns shown as dots, A..D = 10..13) are:
1 . 3 . 5 . 7 . 9 . B . D
21 41 43 63 65 85
221 61 81 83 A3
421 441 A1 C1
2221 621 443 643
4221 641 661
22221 821 841
4421 A21
6221 4441
42221 6421
222221 8221
44221
62221
422221
2222221
Also the number of integer partitions of n whose greatest part is the sum of all the other parts. The Heinz numbers of these partitions are given by A344415. For example, the a(2) = 1 through a(12) = 11 partitions (empty columns not shown) are:
(11) (22) (33) (44) (55) (66)
(211) (321) (422) (532) (633)
(3111) (431) (541) (642)
(4211) (5221) (651)
(41111) (5311) (6222)
(52111) (6321)
(511111) (6411)
(62211)
(63111)
(621111)
(6111111)
Also the number of integer partitions of n of length n/2. The Heinz numbers of these partitions are given by A340387. For example, the a(2) = 1 through a(14) = 15 partitions (empty columns not shown) are:
(2) (22) (222) (2222) (22222) (222222) (2222222)
(31) (321) (3221) (32221) (322221) (3222221)
(411) (3311) (33211) (332211) (3322211)
(4211) (42211) (333111) (3332111)
(5111) (43111) (422211) (4222211)
(52111) (432111) (4322111)
(61111) (441111) (4331111)
(522111) (4421111)
(531111) (5222111)
(621111) (5321111)
(711111) (5411111)
(6221111)
(6311111)
(7211111)
(8111111)
(End)

Examples

			From _Joerg Arndt_, Jun 11 2013: (Start)
There are a(12)=11 symmetric unimodal compositions of 12+2=14 where the maximal part appears twice:
01:  [ 1 1 1 1 1 2 2 1 1 1 1 1 ]
02:  [ 1 1 1 1 3 3 1 1 1 1 ]
03:  [ 1 1 1 4 4 1 1 1 ]
04:  [ 1 1 2 3 3 2 1 1 ]
05:  [ 1 1 5 5 1 1 ]
06:  [ 1 2 4 4 2 1 ]
07:  [ 1 6 6 1 ]
08:  [ 2 2 3 3 2 2 ]
09:  [ 2 5 5 2 ]
10:  [ 3 4 4 3 ]
11:  [ 7 7 ]
There are a(14)=15 symmetric unimodal compositions of 14 where the maximal part appears an even number of times:
01:  [ 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ]
02:  [ 1 1 1 1 1 2 2 1 1 1 1 1 ]
03:  [ 1 1 1 1 3 3 1 1 1 1 ]
04:  [ 1 1 1 2 2 2 2 1 1 1 ]
05:  [ 1 1 1 4 4 1 1 1 ]
06:  [ 1 1 2 3 3 2 1 1 ]
07:  [ 1 1 5 5 1 1 ]
08:  [ 1 2 2 2 2 2 2 1 ]
09:  [ 1 2 4 4 2 1 ]
10:  [ 1 3 3 3 3 1 ]
11:  [ 1 6 6 1 ]
12:  [ 2 2 3 3 2 2 ]
13:  [ 2 5 5 2 ]
14:  [ 3 4 4 3 ]
15:  [ 7 7 ]
(End)
a(8)=5 because we  have [8], [6,2], [4,4], [4,2,2], and [2,2,2,2]. - _Emeric Deutsch_, Jan 27 2016
From _Gus Wiseman_, May 22 2021: (Start)
The a(0) = 1 through a(12) = 11 partitions into even parts are the following (empty columns shown as dots, A = 10, C = 12). The Heinz numbers of these partitions are given by A066207.
  ()  .  (2)  .  (4)   .  (6)    .  (8)     .  (A)      .  (C)
                 (22)     (42)      (44)       (64)        (66)
                          (222)     (62)       (82)        (84)
                                    (422)      (442)       (A2)
                                    (2222)     (622)       (444)
                                               (4222)      (642)
                                               (22222)     (822)
                                                           (4422)
                                                           (6222)
                                                           (42222)
                                                           (222222)
(End)
		

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.

Crossrefs

Bisection (even part) gives the partition numbers A000041.
Column k=0 of A103919, A264398.
Note: A-numbers of ranking sequences are in parentheses below.
The version for odd instead of even parts is A000009 (A066208).
The version for parts divisible by 3 instead of 2 is A035377.
The strict case is A035457.
The Heinz numbers of these partitions are given by A066207.
The ordered version (compositions) is A077957 prepended by (1,0).
This is column k = 2 of A168021.
The multiplicative version (factorizations) is A340785.
A000569 counts graphical partitions (A320922).
A004526 counts partitions of length 2 (A001358).
A025065 counts palindromic partitions (A265640).
A027187 counts partitions with even length/maximum (A028260/A244990).
A058696 counts partitions of even numbers (A300061).
A067661 counts strict partitions of even length (A030229).
A236913 counts partitions of even length and sum (A340784).
A340601 counts partitions of even rank (A340602).
The following count partitions of even length:
- A096373 cannot be partitioned into strict pairs (A320891).
- A338914 can be partitioned into strict pairs (A320911).
- A338915 cannot be partitioned into distinct pairs (A320892).
- A338916 can be partitioned into distinct pairs (A320912).
- A339559 cannot be partitioned into distinct strict pairs (A320894).
- A339560 can be partitioned into distinct strict pairs (A339561).

Programs

  • Maple
    ZL:= [S, {C = Cycle(B), S = Set(C), E = Set(B), B = Prod(Z,Z)}, unlabelled]: seq(combstruct[count](ZL, size=n), n=0..69); # Zerinvary Lajos, Mar 26 2008
    g := 1/mul(1-x^(2*k), k = 1 .. 100): gser := series(g, x = 0, 80): seq(coeff(gser, x, n), n = 0 .. 78); # Emeric Deutsch, Jan 27 2016
    # Using the function EULER from Transforms (see link at the bottom of the page).
    [1,op(EULER([0,1,seq(irem(n,2),n=0..66)]))]; # Peter Luschny, Aug 19 2020
    # next Maple program:
    a:= n-> `if`(n::odd, 0, combinat[numbpart](n/2)):
    seq(a(n), n=0..84);  # Alois P. Heinz, Jun 22 2021
  • Mathematica
    nmax = 50; s = Range[2, nmax, 2];
    Table[Count[IntegerPartitions@n, x_ /; SubsetQ[s, x]], {n, 0, nmax}] (* Robert Price, Aug 05 2020 *)
  • Python
    from sympy import npartitions
    def A035363(n): return 0 if n&1 else npartitions(n>>1) # Chai Wah Wu, Sep 23 2023

Formula

G.f.: Product_{k even} 1/(1 - x^k).
Convolution with the number of partitions into distinct parts (A000009, which is also number of partitions into odd parts) gives the number of partitions (A000041). - Franklin T. Adams-Watters, Jan 06 2006
If n is even then a(n)=A000041(n/2) otherwise a(n)=0. - Omar E. Pol, Nov 20 2009
G.f.: 1 + x^2*(1 - G(0))/(1-x^2) where G(k) = 1 - 1/(1-x^(2*k+2))/(1-x^2/(x^2-1/G(k+1) )); (recursively defined continued fraction). - Sergei N. Gladkovskii, Jan 23 2013
a(n) = A096441(n) - A000009(n), n >= 1. - Omar E. Pol, Aug 16 2013
G.f.: exp(Sum_{k>=1} x^(2*k)/(k*(1 - x^(2*k)))). - Ilya Gutkovskiy, Aug 13 2018

A344616 Alternating sum of the integer partition with Heinz number n.

Original entry on oeis.org

0, 1, 2, 0, 3, 1, 4, 1, 0, 2, 5, 2, 6, 3, 1, 0, 7, 1, 8, 3, 2, 4, 9, 1, 0, 5, 2, 4, 10, 2, 11, 1, 3, 6, 1, 0, 12, 7, 4, 2, 13, 3, 14, 5, 3, 8, 15, 2, 0, 1, 5, 6, 16, 1, 2, 3, 6, 9, 17, 1, 18, 10, 4, 0, 3, 4, 19, 7, 7, 2, 20, 1, 21, 11, 2, 8, 1, 5, 22, 3, 0, 12
Offset: 1

Views

Author

Gus Wiseman, Jun 03 2021

Keywords

Comments

The alternating sum of a partition (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i, which is equal to the number of odd parts in the conjugate partition.
The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k), giving a bijective correspondence between positive integers and integer partitions.
Also the reverse-alternating sum of the prime indices of n.

Examples

			The partition (6,4,3,2,2) has Heinz number 4095 and conjugate (5,5,3,2,1,1), so a(4095) = 5.
		

Crossrefs

Positions of nonzeros are A000037.
Positions of 0's are A000290.
The version for prime factors is A071321 (reverse: A071322).
A version for compositions is A124754.
The version for prime multiplicities is A316523.
The reverse version is A316524, with sign A344617.
A000041 counts partitions of 2n with alternating sum 0.
A056239 adds up prime indices, row sums of A112798.
A103919 counts partitions by sum and alternating sum.
A335433 ranks separable partitions.
A335448 ranks inseparable partitions.
A344606 counts wiggly permutations of prime indices with twins.
A344610 counts partitions by sum and positive reverse-alternating sum.
A344612 counts partitions by sum and reverse-alternating sum.
A344618 gives reverse-alternating sums of standard compositions.

Programs

  • Maple
    a:= n-> (l-> -add(l[i]*(-1)^i, i=1..nops(l)))(sort(map(
        i-> numtheory[pi](i[1])$i[2], ifactors(n)[2]), `>`)):
    seq(a(n), n=1..82);  # Alois P. Heinz, Jun 04 2021
  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}];
    Table[ats[Reverse[primeMS[n]]],{n,100}]

Formula

a(n) = A257991(A122111(n)).
A057427(a(n)) = A049240(n).

A344612 Triangle read by rows where T(n,k) is the number of integer partitions of n with reverse-alternating sum k ranging from -n to n in steps of 2.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 2, 1, 1, 0, 1, 2, 2, 1, 1, 0, 1, 2, 3, 3, 1, 1, 0, 1, 2, 4, 3, 3, 1, 1, 0, 1, 2, 4, 5, 5, 3, 1, 1, 0, 1, 2, 4, 7, 5, 6, 3, 1, 1, 0, 1, 2, 4, 8, 7, 9, 6, 3, 1, 1, 0, 1, 2, 4, 8, 12, 7, 11, 6, 3, 1, 1, 0, 1, 2, 4, 8, 14, 11, 14, 12, 6, 3, 1, 1
Offset: 0

Views

Author

Gus Wiseman, Jun 01 2021

Keywords

Comments

The reverse-alternating sum of a partition (y_1,...,y_k) is Sum_i (-1)^(k-i) y_i. This is also (-1)^(k-1) times the sum of the even-indexed parts minus the sum of the odd-indexed parts.
Also the number of reversed integer partitions of n with alternating sum k ranging from -n to n in steps of 2.
Also the number of integer partitions of n with (-1)^(m-1) * b = k where m is the greatest part and b is the number of odd parts, with k ranging from -n to n in steps of 2.

Examples

			Triangle begins:
                                1
                              0   1
                            0   1   1
                          0   1   1   1
                        0   1   2   1   1
                      0   1   2   2   1   1
                    0   1   2   3   3   1   1
                  0   1   2   4   3   3   1   1
                0   1   2   4   5   5   3   1   1
              0   1   2   4   7   5   6   3   1   1
            0   1   2   4   8   7   9   6   3   1   1
          0   1   2   4   8  12   7  11   6   3   1   1
        0   1   2   4   8  14  11  14  12   6   3   1   1
      0   1   2   4   8  15  19  11  18  12   6   3   1   1
    0   1   2   4   8  15  24  15  23  20  12   6   3   1   1
  0   1   2   4   8  15  26  30  15  31  21  12   6   3   1   1
For example, row n = 7 counts the following partitions:
  (61)  (52)    (43)      (331)      (322)    (511)  (7)
        (4111)  (2221)    (22111)    (421)
                (3211)    (1111111)  (31111)
                (211111)
Row n = 9 counts the following partitions:
  81  72    63      54        441        333      522    711  9
      6111  4221    3222      22221      432      621
            5211    3321      33111      531      51111
            411111  4311      2211111    32211
                    222111    111111111  42111
                    321111               3111111
                    21111111
		

Crossrefs

Row sums are A000041.
The midline k = n/2 is also A000041.
The right half (i.e., k >= 0) for even n is A344610.
The rows appear to converge to A344611 (from left) and A006330 (from right).
The non-reversed version is A344651 (A239830 interleaved with A239829).
The strict version is A344739.
A000041 counts partitions of 2n with alternating sum 0, ranked by A000290.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A120452 counts partitions of 2n with rev-alt sum 2 (negative: A344741).
A316524 is the alternating sum of the prime indices of n (reverse: A344616).
A325534/A325535 count separable/inseparable partitions.
A344618 gives reverse-alternating sums of standard compositions.

Programs

  • Mathematica
    sats[y_]:=Sum[(-1)^(i-Length[y])*y[[i]],{i,Length[y]}];
    Table[Length[Select[IntegerPartitions[n],sats[#]==k&]],{n,0,15},{k,-n,n,2}]
  • PARI
    row(n)={my(v=vector(n+1)); forpart(p=n, my(s=-sum(i=1, #p, p[i]*(-1)^i)); v[(s+n)/2+1]++); v} \\ Andrew Howroyd, Jan 06 2024

A000346 a(n) = 2^(2*n+1) - binomial(2*n+1, n+1).

Original entry on oeis.org

1, 5, 22, 93, 386, 1586, 6476, 26333, 106762, 431910, 1744436, 7036530, 28354132, 114159428, 459312152, 1846943453, 7423131482, 29822170718, 119766321572, 480832549478, 1929894318332, 7744043540348, 31067656725032, 124613686513778, 499744650202436
Offset: 0

Views

Author

Keywords

Comments

Also a(n) = 2nd elementary symmetric function of binomial(n,0), binomial(n,1), ..., binomial(n,n).
Also a(n) = one half the sum of the heights, over all Dyck (n+2)-paths, of the vertices that are at even height and terminate an upstep. For example with n=1, these vertices are indicated by asterisks in the 5 Dyck 3-paths: UU*UDDD, UU*DU*DD, UDUU*DD, UDUDUD, UU*DDUD, yielding a(1)=(2+4+2+0+2)/2=5. - David Callan, Jul 14 2006
Hankel transform is (-1)^n*(2n+1); the Hankel transform of sum(k=0..n, C(2*n,k) ) - C(2n,n) is (-1)^n*n. - Paul Barry, Jan 21 2007
Row sums of the Riordan matrix (1/(1-4x),(1-sqrt(1-4x))/2) (A187926). - Emanuele Munarini, Mar 16 2011
From Gus Wiseman, Jul 19 2021: (Start)
For n > 0, a(n-1) is also the number of integer compositions of 2n with nonzero alternating sum, where the alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i. These compositions are ranked by A053754 /\ A345921. For example, the a(3-1) = 22 compositions of 6 are:
(6) (1,5) (1,1,4) (1,1,1,3) (1,1,1,1,2)
(2,4) (1,2,3) (1,1,3,1) (1,1,2,1,1)
(4,2) (1,4,1) (1,2,1,2) (2,1,1,1,1)
(5,1) (2,1,3) (1,3,1,1)
(2,2,2) (2,1,2,1)
(3,1,2) (3,1,1,1)
(3,2,1)
(4,1,1)
(End)

Examples

			G.f. = 1 + 5*x + 22*x^2 + 93*x^3 + 386*x^4 + 1586*x^5 + 6476*x^6 + ...
		

References

  • T. Myers and L. Shapiro, Some applications of the sequence 1, 5, 22, 93, 386, ... to Dyck paths and ordered trees, Congressus Numerant., 204 (2010), 93-104.
  • D. Phulara and L. W. Shapiro, Descendants in ordered trees with a marked vertex, Congressus Numerantium, 205 (2011), 121-128.
  • 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).

Crossrefs

Cf. A000108, A014137, A014318. A column of A058893. Subdiagonal of A053979.
Bisection of A058622 and (possibly) A007008.
Even bisection of A294175 (without the first two terms).
The following relate to compositions of 2n with alternating sum k.
- The k > 0 case is counted by A000302.
- The k <= 0 case is counted by A000302.
- The k != 0 case is counted by A000346 (this sequence).
- The k = 0 case is counted by A001700 or A088218.
- The k < 0 case is counted by A008549.
- The k >= 0 case is counted by A114121.
A011782 counts compositions.
A086543 counts partitions with nonzero alternating sum (bisection: A182616).
A097805 counts compositions by alternating (or reverse-alternating) sum.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A345197 counts compositions by length and alternating sum.

Programs

  • Magma
    [2^(2*n+1) - Binomial(2*n+1,n+1): n in [0..30]]; // Vincenzo Librandi, Jun 07 2011
  • Maple
    seq(2^(2*n+1)-binomial(2*n,n)*(2*n+1)/(n+1), n=0..12); # Emanuele Munarini, Mar 16 2011
  • Mathematica
    Table[2^(2n+1)-Binomial[2n,n](2n+1)/(n+1),{n,0,20}] (* Emanuele Munarini, Mar 16 2011 *)
    a[ n_] := If[ n<-4, 0, (4^(n + 1) - Binomial[2 n + 2, n + 1]) / 2]; (* Michael Somos, Jan 25 2014 *)
  • Maxima
    makelist(2^(2*n+1)-binomial(2*n,n)*(2*n+1)/(n+1),n,0,12); /* Emanuele Munarini, Mar 16 2011 */
    
  • PARI
    {a(n) = if( n<-4, 0, n++; (2^(2*n) - binomial(2*n, n)) / 2)}; /* Michael Somos, Jan 25 2014 */
    

Formula

G.f.: c(x)/(1-4x), c(x) = g.f. of Catalan numbers.
Convolution of Catalan numbers and powers of 4.
Also one half of convolution of central binomial coeffs. A000984(n), n=0, 1, 2, ... with shifted central binomial coeffs. A000984(n), n=1, 2, 3, ...
a(n) = A045621(2n+1) = (1/2)*A068551(n+1).
a(n) = Sum_{k=0..n} A000984(k)*A001700(n-k). - Philippe Deléham, Jan 22 2004
a(n) = Sum_{k=0..n+1} binomial(n+k, k-1)2^(n-k+1). - Paul Barry, Nov 13 2004
a(n) = Sum_{i=0..n} binomial(2n+2, i). See A008949. - Ed Catmur (ed(AT)catmur.co.uk), Dec 09 2006
a(n) = Sum_{k=0..n+1, C(2n+2,k)} - C(2n+2,n+1). - Paul Barry, Jan 21 2007
Logarithm g.f. log(1/(2-C(x)))=sum(n>0, a(n)/n*x^n), C(x)=(1-sqrt(1-4*x))/2x (A000108). - Vladimir Kruchinin, Aug 10 2010
D-finite with recurrence: (n+3) a(n+2) - 2(4n+9) a(n+1) + 8(2n+3) a(n) = 0. - Emanuele Munarini, Mar 16 2011
E.g.f.:exp(2*x)*(2*exp(2*x) - BesselI(0,2*x) - BesselI(1,2*x)).
This is the first derivative of exp(2*x)*(exp(2*x) - BesselI(0,2*x))/2. See the e.g.f. of A032443 (which has a plus sign) and the remarks given there. - Wolfdieter Lang, Jan 16 2012
a(n) = Sum_{0<=iMircea Merca, Apr 05 2012
A000346 = A004171 - A001700. See A032443 for the sum. - M. F. Hasler, Jan 02 2014
0 = a(n) * (256*a(n+1) - 224*a(n+2) + 40*a(n+3)) + a(n+1) * (-32*a(n+1) + 56*a(n+2) - 14*a(n+3)) + a(n+2) * (-2*a(n+2) + a(n+3)) if n>-5. - Michael Somos, Jan 25 2014
REVERT transform is [1,-5,28,-168,1056,...] = alternating signed version of A069731. - Michael Somos, Jan 25 2014
Convolution square is A038806. - Michael Somos, Jan 25 2014
BINOMIAL transform of A055217(n-1) is a(n-1). - Michael Somos, Jan 25 2014
(n+1) * a(n) = A033504(n). - Michael Somos, Jan 25 2014
Recurrence: (n+1)*a(n) = 512*(2*n-7)*a(n-5) + 256*(13-5*n)*a(n-4) + 64*(10*n-17)*a(n-3) + 32*(4-5*n)*a(n-2) + 2*(10*n+1)*a(n-1), n>=5. - Fung Lam, Mar 21 2014
Asymptotic approximation: a(n) ~ 2^(2n+1)*(1-1/sqrt(n*Pi)). - Fung Lam, Mar 21 2014
a(n) = Sum_{m = n+2..2*(n+1)} binomial(2*(n+1), m), n >= 0. - Wolfdieter Lang, May 22 2015
a(n) = A000302(n) + A008549(n). - Gus Wiseman, Jul 19 2021
a(n) = Sum_{j=1..n+1} Sum_{k=1..j} 2^(j-k)*binomial(n+k-1, n). - Fabio Visonà, May 04 2022
a(n) = (1/2)*(-1)^n*binomial(-(n+1), n+2)*hypergeom([1, 2*n + 3], [n + 3], 1/2). - Peter Luschny, Nov 29 2023

Extensions

Corrected by Christian G. Bower

A000097 Number of partitions of n if there are two kinds of 1's and two kinds of 2's.

Original entry on oeis.org

1, 2, 5, 9, 17, 28, 47, 73, 114, 170, 253, 365, 525, 738, 1033, 1422, 1948, 2634, 3545, 4721, 6259, 8227, 10767, 13990, 18105, 23286, 29837, 38028, 48297, 61053, 76926, 96524, 120746, 150487, 187019, 231643, 286152, 352413, 432937, 530383, 648245
Offset: 0

Views

Author

Keywords

Comments

Also number of partitions of 2*n with exactly 2 odd parts (offset 1). - Vladeta Jovovic, Jan 12 2005
Also number of transitions from one partition of n+2 to another, where a transition consists of replacing any two parts with their sum. Remove all 1' and 2' from the partition, replacing them with ((number of 2') + 1) and ((number of 1') + (number of 2') + 1); these are the two parts being summed. Number of partitions of n into parts of 2 kinds with at most 2 parts of the second kind, or of n+2 into parts of 2 kinds with exactly 2 parts of the second kind. - Franklin T. Adams-Watters, Mar 20 2006
From Christian Gutschwager (gutschwager(AT)math.uni-hannover.de), Feb 10 2010: (Start)
a(n) is also the number of pairs of partitions of n+2 which differ by only one box (for bijection see the first Gutschwager link).
a(n) is also the number of partitions of n with two parts marked.
a(n) is also the number of partitions of n+1 with two different parts marked. (End)
Convolution of A000041 and A008619. - Vaclav Kotesovec, Aug 18 2015
a(n) = P(/2,n), a particular case of P(/k,n) defined as follows: P(/0,n) = A000041(n) and P(/k,n) = P(/k-1, n) + P(/k-1,n-k) + P(/k-1, n-2k) + ... Also, P(/k,n) = the convolution of A000041 and the partitions of n with exactly k parts, and g.f. P(/k,n) = (g.f. for P(n)) * 1/(1-x)...(1-x^k). - Gregory L. Simay, Mar 22 2018
a(n) is also the sum of binomial(D(p),2) in partitions p of (n+3), where D(p)= number of different sizes of parts in p. - Emily Anible, Apr 03 2018
Also partitions of 2*(n+1) with alternating sum 2. Also partitions of 2*(n+1) with reverse-alternating sum -2 or 2. - Gus Wiseman, Jun 21 2021
Define the distance graph of the partitions of n using the distance function in A366156 as follows: two vertices (partitions) share an edge if and only if the distance between the vertices is 2. Then a(n) is the number of edges in the distance graph of the partitions of n. - Clark Kimberling, Oct 12 2023

Examples

			a(3) = 9 because we have 3, 2+1, 2+1', 2'+1, 2'+1', 1+1+1, 1+1+1', 1+1'+1' and 1'+1'+1'.
From _Gus Wiseman_, Jun 22 2021: (Start)
The a(0) = 1 through a(4) = 9 partitions of 2*(n+1) with exactly 2 odd parts:
  (1,1)  (3,1)    (3,3)      (5,3)
         (2,1,1)  (5,1)      (7,1)
                  (3,2,1)    (3,3,2)
                  (4,1,1)    (4,3,1)
                  (2,2,1,1)  (5,2,1)
                             (6,1,1)
                             (3,2,2,1)
                             (4,2,1,1)
                             (2,2,2,1,1)
The a(0) = 1 through a(4) = 9 partitions of 2*(n+1) with alternating sum 2:
  (2)  (3,1)    (4,2)        (5,3)
       (2,1,1)  (2,2,2)      (3,3,2)
                (3,2,1)      (4,3,1)
                (3,1,1,1)    (3,2,2,1)
                (2,1,1,1,1)  (4,2,1,1)
                             (2,2,2,1,1)
                             (3,2,1,1,1)
                             (3,1,1,1,1,1)
                             (2,1,1,1,1,1,1)
(End)
		

References

  • H. Gupta et al., Tables of Partitions. Royal Society Mathematical Tables, Vol. 4, Cambridge Univ. Press, 1958, p. 90.
  • J. Riordan, Combinatorial Identities, Wiley, 1968, p. 199.
  • 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).

Crossrefs

First differences are in A024786.
Third column of Riordan triangle A008951 and of triangle A103923.
The case of reverse-alternating sum 1 or alternating sum 0 is A000041.
The case of reverse-alternating sum -1 or alternating sum 1 is A000070.
The normal case appears to be A004526 or A065033.
The strict case is A096914.
The case of reverse-alternating sum 2 is A120452.
The case of reverse-alternating sum -2 is A344741.
A001700 counts compositions with alternating sum 2.
A035363 counts partitions into even parts.
A058696 counts partitions of 2n.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A124754 gives alternating sums of standard compositions (reverse: A344618).
A316524 is the alternating sum of the prime indices of n (reverse: A344616).
A344610 counts partitions by sum and positive reverse-alternating sum.
A344611 counts partitions of 2n with reverse-alternating sum >= 0.
Shift of A093695.

Programs

  • Maple
    with(numtheory): etr:= proc(p) local b; b:=proc(n) option remember; local d,j; if n=0 then 1 else add(add(d*p(d), d=divisors(j)) *b(n-j), j=1..n)/n fi end end: a:= etr(n->`if`(n<3,2,1)): seq(a(n), n=0..40); # Alois P. Heinz, Sep 08 2008
  • Mathematica
    CoefficientList[Series[1/((1 - x) (1 - x^2) Product[1 - x^k, {k, 1, 100}]), {x, 0, 100}], x] (* Ben Branman, Mar 07 2012 *)
    etr[p_] := Module[{b}, b[n_] := b[n] = If[n == 0, 1, Sum[Sum[d*p[d], {d, Divisors[j]}]*b[n - j], {j, 1, n}]/n]; b]; a = etr[If[# < 3, 2, 1]&]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Apr 09 2014, after Alois P. Heinz *)
    (1/((1 - x) (1 - x^2) QPochhammer[x]) + O[x]^50)[[3]] (* Vladimir Reshetnikov, Nov 22 2016 *)
    Table[Length@IntegerPartitions[n,All,Join[{1,2},Range[n]]],{n,0,15}] (* Robert Price, Jul 28 2020 and Jun 21 2021 *)
    T[n_, 0] := PartitionsP[n];
    T[n_, m_] /; (n >= m (m + 1)/2) := T[n, m] = T[n - m, m - 1] + T[n - m, m];
    T[, ] = 0;
    a[n_] := T[n + 3, 2];
    Table[a[n], {n, 0, 60}] (* Jean-François Alcover, May 30 2021 *)
    ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}];Table[Length[Select[IntegerPartitions[n],ats[#]==2&]],{n,0,30,2}] (* Gus Wiseman, Jun 21 2021 *)
  • PARI
    my(x = 'x + O('x^66)); Vec( 1/((1-x)*(1-x^2)*eta(x)) ) \\ Joerg Arndt, Apr 29 2013

Formula

Euler transform of 2 2 1 1 1 1 1...
G.f.: 1/( (1-x) * (1-x^2) * Product_{k>=1} (1-x^k) ).
a(n) = Sum_{j=0..floor(n/2)} A000070(n-2*j), n>=0.
a(n) = A014153(n)/2 + A087787(n)/4 + A000070(n)/4. - Vaclav Kotesovec, Nov 05 2016
a(n) ~ sqrt(3) * exp(Pi*sqrt(2*n/3)) / (4*Pi^2) * (1 + 35*Pi/(24*sqrt(6*n))). - Vaclav Kotesovec, Aug 18 2015, extended Nov 05 2016
a(n) = A120452(n) + A344741(n). - Gus Wiseman, Jun 21 2021

Extensions

More terms from Pab Ter (pabrlos(AT)yahoo.com), May 04 2004
Edited by Emeric Deutsch, Mar 23 2005
More terms from Franklin T. Adams-Watters, Mar 20 2006
Edited by Charles R Greathouse IV, Apr 20 2010

A008549 Number of ways of choosing at most n-1 items from a set of size 2*n+1.

Original entry on oeis.org

0, 1, 6, 29, 130, 562, 2380, 9949, 41226, 169766, 695860, 2842226, 11576916, 47050564, 190876696, 773201629, 3128164186, 12642301534, 51046844836, 205954642534, 830382690556, 3345997029244, 13475470680616, 54244942336114, 218269673491780, 877940640368572
Offset: 0

Views

Author

Keywords

Comments

Area under Dyck excursions (paths ending in 0): a(n) is the sum of the areas under all Dyck excursions of length 2*n (nonnegative walks beginning and ending in 0 with jumps -1,+1).
Number of inversions in all 321-avoiding permutations of [n+1]. Example: a(2)=6 because the 321-avoiding permutations of [3], namely 123,132,312,213,231, have 0, 1, 2, 1, 2 inversions, respectively. - Emeric Deutsch, Jul 28 2003
Convolution of A001791 and A000984. - Paul Barry, Feb 16 2005
a(n) = total semilength of "longest Dyck subpath" starting at an upstep U taken over all upsteps in all Dyck paths of semilength n. - David Callan, Jul 25 2008
[1,6,29,130,562,2380,...] is convolution of A001700 with itself. - Philippe Deléham, May 19 2009
From Ran Pan, Feb 04 2016: (Start)
a(n) is the total number of times that all the North-East lattice paths from (0,0) to (n+1,n+1) bounce off the diagonal y = x to the right. This is related to paired pattern P_2 in Pan and Remmel's link and more details can be found in Section 3.2 in the link.
a(n) is the total number of times that all the North-East lattice paths from (0,0) to (n+1,n+1) horizontally cross the diagonal y = x. This is related to paired pattern P_3 in Pan and Remmel's link and more details can be found in Section 3.3 in the link.
2*a(n) is the total number of times that all the North-East lattice paths from (0,0) to (n+1,n+1) bounce off the diagonal y = x. This is related to paired pattern P_2 and P_4 in Pan and Remmel's link and more details can be found in Section 4.2 in the link.
2*a(n) is the total number of times that all the North-East lattice paths from (0,0) to (n+1,n+1) cross the diagonal y = x. This is related to paired pattern P_3 and P_4 in Pan and Remmel's link and more details can be found in Section 4.3 in the link. (End)
From Gus Wiseman, Jul 17 2021: (Start)
Also the number of integer compositions of 2*(n+1) with alternating sum < 0, where the alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i. For example, the a(3) = 29 compositions of 8 are:
(1,7) (1,5,2) (1,1,1,5) (1,1,1,4,1) (1,1,1,1,1,3)
(2,6) (1,6,1) (1,1,2,4) (1,2,1,3,1) (1,1,1,2,1,2)
(3,5) (2,5,1) (1,2,1,4) (1,3,1,2,1) (1,1,1,3,1,1)
(1,2,2,3) (1,4,1,1,1) (1,2,1,1,1,2)
(1,3,1,3) (1,2,1,2,1,1)
(1,3,2,2) (1,3,1,1,1,1)
(1,4,1,2)
(1,4,2,1)
(1,5,1,1)
(2,1,1,4)
(2,2,1,3)
(2,3,1,2)
(2,4,1,1)
Also the number of integer compositions of 2*(n+1) with reverse-alternating sum < 0. For a bijection, keep the odd-length compositions and reverse the even-length ones.
Also the number of 2*(n+1)-digit binary numbers with more 0's than 1's. For example, the a(2) = 6 binary numbers are: 100000, 100001, 100010, 100100, 101000, 110000; or in decimal: 32, 33, 34, 36, 40, 48.
(End)

Examples

			a(2) = 6 because there are 6 ways to choose at most 1 item from a set of size 5: You can choose the empty set, or you can choose any of the five one-element sets.
G.f. = x + 6*x^2 + 29*x^3 + 130*x^4 + 562*x^5 + 2380*x^6 + 9949*x^7 + ...
		

References

  • D. Phulara and L. W. Shapiro, Descendants in ordered trees with a marked vertex, Congressus Numerantium, 205 (2011), 121-128.

Crossrefs

Odd bisection of A294175 (even is A000346).
For integer compositions of 2*(n+1) with alternating sum k < 0 we have:
- The opposite (k > 0) version is A000302.
- The weak (k <= 0) version is (also) A000302.
- The k = 0 version is A001700 or A088218.
- The reverse-alternating version is also A008549 (this sequence).
- These compositions are ranked by A053754 /\ A345919.
- The complement (k >= 0) is counted by A114121.
- The case of reversed integer partitions is A344743(n+1).
A011782 counts compositions.
A097805 counts compositions by alternating (or reverse-alternating) sum.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A316524 gives the alternating sum of prime indices (reverse: A344616).
A344610 counts partitions by sum and positive reverse-alternating sum.
A345197 counts compositions by length and alternating sum.

Programs

  • Magma
    [4^n-Binomial(2*n+1, n): n in [0..30]]; // Vincenzo Librandi, Feb 04 2016
    
  • Maple
    A008549:=n->4^n-binomial(2*n+1,n): seq(A008549(n), n=0..30);
  • Mathematica
    Table[4^n-Binomial[2n+1,n],{n,0,30}] (* Harvey P. Dale, May 11 2011 *)
    a[ n_] := If[ n<-4, 0, 4^n - Binomial[2 n + 2, n + 1] / 2] (* Michael Somos, Jan 25 2014 *)
  • PARI
    {a(n)=if(n<0, 0, 4^n - binomial(2*n+1, n))} /* Michael Somos Oct 31 2006 */
    
  • PARI
    {a(n) = if( n<-4, 0, n++; (4^n / 2 - binomial(2*n, n)) / 2)} /* Michael Somos, Jan 25 2014 */
    
  • Python
    import math
    def C(n,r):
        f=math.factorial
        return f(n)/f(r)/f(n-r)
    def A008549(n):
        return int((4**n)-C(2*n+1,n)) # Indranil Ghosh, Feb 18 2017

Formula

a(n) = 4^n - C(2*n+1, n).
a(n) = Sum_{k=1..n} Catalan(k)*4^(n-k): convolution of Catalan numbers and powers of 4.
G.f.: x*c(x)^2/(1 - 4*x), c(x) = g.f. of Catalan numbers. - Wolfdieter Lang
Note Sum_{k=0..2*n+1} binomial(2*n+1, k) = 2^(2n+1). Therefore, by the symmetry of Pascal's triangle, Sum_{k=0..n} binomial(2*n+1, k) = 2^(2*n) = 4^n. This explains why the following two expressions for a(n) are equal: Sum_{k=0..n-1} binomial(2*n+1, k) = 4^n - binomial(2*n+1, n). - Dan Velleman
G.f.: (2*x^2 - 1 + sqrt(1 - 4*x^2))/(2*(1 + 2*x)*(2*x - 1)*x^3).
a(n) = Sum_{k=0..n} C(2*k, k)*C(2*(n-k), n-k-1). - Paul Barry, Feb 16 2005
Second binomial transform of 2^n - C(n, floor(n/2)) = A045621(n). - Paul Barry, Jan 13 2006
a(n) = Sum_{0 < i <= k < n} binomial(n, k+i)*binomial(n, k-i). - Mircea Merca, Apr 05 2012
D-finite with recurrence (n+1)*a(n) + 2*(-4*n-1)*a(n-1) + 8*(2*n-1)*a(n-2) = 0. - R. J. Mathar, Dec 03 2012
0 = a(n) * (256*a(n+1) - 224*a(n+2) + 40*a(n+3)) + a(n+1) * (-32*a(n+1) + 56*a(n+2) - 14*a(n+3)) + a(n+2) * (-2*a(n+2) + a(n+3)) if n > -5. - Michael Somos, Jan 25 2014
Convolution square is A045894. - Michael Somos, Jan 25 2014
HANKEL transform is [0, -1, 2, -3, 4, -5, ...]. - Michael Somos, Jan 25 2014
BINOMIAL transform of [0, 0, 1, 3, 11, 35,...] (A109196) is [0, 0, 1, 6, 29, 130, ...]. - Michael Somos, Jan 25 2014
(n+1) * a(n) = A153338(n+1). - Michael Somos, Jan 25 2014
a(n) = Sum_{m = n+2..2*n+1} binomial(2*n+1,m), n >= 0. - Wolfdieter Lang, May 22 2015
E.g.f.: (exp(2*x) - BesselI(0,2*x) - BesselI(1,2*x))*exp(2*x). - Ilya Gutkovskiy, Aug 30 2016

Extensions

Better description from Dan Velleman (djvelleman(AT)amherst.edu), Dec 01 2000

A344607 Number of integer partitions of n with reverse-alternating sum >= 0.

Original entry on oeis.org

1, 1, 2, 2, 4, 4, 8, 8, 15, 16, 27, 29, 48, 52, 81, 90, 135, 151, 220, 248, 352, 400, 553, 632, 859, 985, 1313, 1512, 1986, 2291, 2969, 3431, 4394, 5084, 6439, 7456, 9357, 10836, 13479, 15613, 19273, 22316, 27353, 31659, 38558, 44601, 53998, 62416, 75168
Offset: 0

Views

Author

Gus Wiseman, May 29 2021

Keywords

Comments

The reverse-alternating sum of a partition (y_1,...,y_k) is Sum_i (-1)^(k-i) y_i.
Also the number of reversed integer partitions of n with alternating sum >= 0.
A formula for the reverse-alternating sum of a partition is: (-1)^(k-1) times the number of odd parts in the conjugate partition, where k is the number of parts. So a(n) is the number of integer partitions of n whose conjugate parts are all even or whose length is odd. By conjugation, this is also the number of integer partitions of n whose parts are all even or whose greatest part is odd.
All integer partitions have alternating sum >= 0, so the non-reversed version is A000041.
Is this sequence weakly increasing? In particular, is A344611(n) <= A160786(n)?

Examples

			The a(1) = 1 through a(8) = 15 partitions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (111)  (22)    (221)    (33)      (322)      (44)
                    (211)   (311)    (222)     (331)      (332)
                    (1111)  (11111)  (321)     (421)      (422)
                                     (411)     (511)      (431)
                                     (2211)    (22111)    (521)
                                     (21111)   (31111)    (611)
                                     (111111)  (1111111)  (2222)
                                                          (3311)
                                                          (22211)
                                                          (32111)
                                                          (41111)
                                                          (221111)
                                                          (2111111)
                                                          (11111111)
		

Crossrefs

The non-reversed version is A000041.
The opposite version (rev-alt sum <= 0) is A027187, ranked by A028260.
The strict case for n > 0 is A067659 (even bisection: A344650).
The ordered version appears to be A116406 (even bisection: A114121).
The odd bisection is A160786.
The complement is counted by A344608.
The Heinz numbers of these partitions are A344609 (complement: A119899).
The even bisection is A344611.
A000070 counts partitions with alternating sum 1 (reversed: A000004).
A000097 counts partitions with alternating sum 2 (reversed: A120452).
A035363 counts partitions with alternating sum 0, ranked by A000290.
A103919 counts partitions by sum and alternating sum.
A316524 is the alternating sum of prime indices of n (reversed: A344616).
A325534/A325535 count separable/inseparable partitions.
A344610 counts partitions by sum and positive reverse-alternating sum.
A344612 counts partitions by sum and reverse-alternating sum.
A344618 gives reverse-alternating sums of standard compositions.

Programs

  • Mathematica
    sats[y_]:=Sum[(-1)^(i-Length[y])*y[[i]],{i,Length[y]}];
    Table[Length[Select[IntegerPartitions[n],sats[#]>=0&]],{n,0,30}]

Formula

a(n) + A344608(n) = A000041(n).
a(2n+1) = A160786(n).

A345170 Number of integer partitions of n with an alternating permutation.

Original entry on oeis.org

1, 1, 1, 2, 3, 5, 6, 10, 14, 19, 25, 36, 48, 64, 84, 111, 146, 191, 244, 315, 404, 515, 651, 823, 1035, 1295, 1616, 2011, 2492, 3076, 3787, 4650, 5695, 6952, 8463, 10280, 12460, 15059, 18162, 21858, 26254, 31463, 37641, 44933, 53554, 63704, 75653, 89683, 106162, 125445, 148020
Offset: 0

Views

Author

Gus Wiseman, Jun 13 2021

Keywords

Comments

First differs from A325534 at a(10) = 25, A325534(10) = 26. The first separable partition without an alternating permutation is (3,2,2,2,1).
A sequence is alternating if it is alternately strictly increasing and strictly decreasing, starting with either. For example, the partition (3,3,2,2,2,2,1) has no alternating permutations, even though it has the anti-run permutations (2,3,2,3,2,1,2), (2,3,2,1,2,3,2), and (2,1,2,3,2,3,2).

Examples

			The a(1) = 1 through a(8) = 14 partitions:
  (1)  (2)  (3)   (4)    (5)    (6)     (7)      (8)
            (21)  (31)   (32)   (42)    (43)     (53)
                  (211)  (41)   (51)    (52)     (62)
                         (221)  (321)   (61)     (71)
                         (311)  (411)   (322)    (332)
                                (2211)  (331)    (422)
                                        (421)    (431)
                                        (511)    (521)
                                        (3211)   (611)
                                        (22111)  (3221)
                                                 (3311)
                                                 (4211)
                                                 (22211)
                                                 (32111)
		

Crossrefs

Includes all strict partitions A000009.
Including twins (x,x) gives A344740.
The normal case is A345163 (complement: A345162).
The complement is counted by A345165, ranked by A345171.
The Heinz numbers of these partitions are A345172.
The version for factorizations is A348379.
A000041 counts integer partitions.
A001250 counts alternating permutations.
A003242 counts anti-run compositions.
A005649 counts anti-run patterns.
A025047 counts alternating compositions (ascend: A025048, descend: A025049).
A325534 counts separable partitions, ranked by A335433.
A325535 counts inseparable partitions, ranked by A335448.
A344604 counts alternating compositions with twins.

Programs

  • Mathematica
    wigQ[y_]:=Or[Length[y]==0,Length[Split[y]]== Length[y]&&Length[Split[Sign[Differences[y]]]]==Length[y]-1];
    Table[Length[Select[IntegerPartitions[n],Select[Permutations[#],wigQ]!={}&]],{n,0,15}]

Extensions

a(26)-a(32) from Robert Price, Jun 23 2021
a(33)-a(48) from Alois P. Heinz, Jun 23 2021
a(49) onwards from Joseph Likar, Sep 05 2023

A344606 Number of alternating permutations of the prime factors of n, counting multiplicity, including twins (x,x).

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 0, 1, 2, 1, 1, 1, 2, 2, 0, 1, 1, 1, 1, 2, 2, 1, 0, 1, 2, 0, 1, 1, 4, 1, 0, 2, 2, 2, 2, 1, 2, 2, 0, 1, 4, 1, 1, 1, 2, 1, 0, 1, 1, 2, 1, 1, 0, 2, 0, 2, 2, 1, 4, 1, 2, 1, 0, 2, 4, 1, 1, 2, 4, 1, 1, 1, 2, 1, 1, 2, 4, 1, 0, 0, 2, 1, 4, 2, 2, 2
Offset: 1

Views

Author

Gus Wiseman, May 28 2021

Keywords

Comments

Differs from A335448 in having a(x^2) = 0 and a(270) = 0.
These are permutations of the prime factors of n, counting multiplicity, with no adjacent triples (..., x, y, z, ...) where x <= y <= z or x >= y >= z.
The version without twins (x,x) is A345164, which is identical to this sequence except when n is the square of a prime.

Examples

			The permutations for n = 2, 6, 30, 180, 210, 300, 420, 720, 840:
  2   23   253   23253   2537   25253   23275   2323252   232527
      32   325   32325   2735   25352   25273   2325232   232725
           352   32523   3275   32525   25372   2523232   252327
           523   35232   3527   35252   27253             252723
                 52323   3725   52325   27352             272325
                         5273   52523   32527             272523
                         5372           32725             325272
                         5723           35272             327252
                         7253           37252             523272
                         7352           52327             527232
                                        52723             723252
                                        57232             725232
                                        72325
                                        72523
For example, there are no alternating permutations of the prime factors of 270 because the only anti-runs are {3,2,3,5,3} and {3,5,3,2,3}, neither of which is alternating, so a(270) = 0.
		

Crossrefs

The version for permutations is A001250.
The extension to anti-run permutations is A335452.
The version for compositions is A344604.
The version for patterns is A344605.
Positions of zeros are A344653 (counted by A344654).
Not including twins (x,x) gives A345164.
A008480 counts permutations of prime indices (strict: A335489, rank: A333221).
A056239 adds up prime indices, row sums of A112798.
A071321 and A071322 are signed sums of prime factors.
A316523 is a signed sum of prime multiplicities.
A316524 and A344616 are signed sums of prime indices.
A325534 counts separable partitions (ranked by A335433).
A325535 counts inseparable partitions (ranked by A335448).
A344740 counts partitions with an alternating permutation or twin (x,x).

Programs

  • Mathematica
    Table[Length[Select[Permutations[Flatten[ConstantArray@@@FactorInteger[n]]],!MatchQ[#,{_,x_,y_,z_,_}/;x<=y<=z||x>=y>=z]&]],{n,100}]
Showing 1-10 of 135 results. Next