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.

Previous Showing 11-20 of 149 results. Next

A345197 Concatenation of square matrices A(n), each read by rows, where A(n)(k,i) is the number of compositions of n of length k with alternating sum i, where 1 <= k <= n, and i ranges from -n + 2 to n in steps of 2.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jul 03 2021

Keywords

Comments

The alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i.

Examples

			The matrices for n = 1..7:
  1   0 1   0 0 1   0 0 0 1   0 0 0 0 1   0 0 0 0 0 1   0 0 0 0 0 0 1
      1 0   1 1 0   1 1 1 0   1 1 1 1 0   1 1 1 1 1 0   1 1 1 1 1 1 0
            0 1 0   0 1 2 0   0 1 2 3 0   0 1 2 3 4 0   0 1 2 3 4 5 0
                    0 1 0 0   0 2 2 0 0   0 3 4 3 0 0   0 4 6 6 4 0 0
                              0 0 1 0 0   0 0 2 3 0 0   0 0 3 6 6 0 0
                                          0 0 1 0 0 0   0 0 3 3 0 0 0
                                                        0 0 0 1 0 0 0
Matrix n = 5 counts the following compositions:
           i=-3:        i=-1:          i=1:            i=3:        i=5:
        -----------------------------------------------------------------
   k=1: |    0            0             0               0          (5)
   k=2: |   (14)         (23)          (32)            (41)         0
   k=3: |    0          (131)       (221)(122)   (311)(113)(212)    0
   k=4: |    0       (1211)(1112)  (2111)(1121)         0           0
   k=5: |    0            0          (11111)            0           0
		

Crossrefs

The number of nonzero terms in each matrix appears to be A000096.
The number of zeros in each matrix appears to be A000124.
Row sums and column sums both appear to be A007318 (Pascal's triangle).
The matrix sums are A131577.
Antidiagonal sums appear to be A163493.
The reverse-alternating version is also A345197 (this sequence).
Antidiagonals are A345907.
Traces are A345908.
A000041 counts partitions of 2n with alternating sum 0, ranked by A000290.
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.
A344611 counts partitions of 2n with reverse-alternating sum >= 0.
Other tetrangles: A318393, A318816, A320808, A321912.
Compositions of n, 2n, or 2n+1 with alternating/reverse-alternating sum k:
- k = 0: counted by A088218, 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, 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

  • Mathematica
    ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Length[#]==k&&ats[#]==i&]],{n,0,6},{k,1,n},{i,-n+2,n,2}]

A002694 Binomial coefficients C(2n, n-2).

Original entry on oeis.org

1, 6, 28, 120, 495, 2002, 8008, 31824, 125970, 497420, 1961256, 7726160, 30421755, 119759850, 471435600, 1855967520, 7307872110, 28781143380, 113380261800, 446775310800, 1761039350070, 6943526580276, 27385657281648, 108043253365600
Offset: 2

Views

Author

Keywords

Comments

Number of lattice paths from (0,0) to (n,n) with steps E=(1,0) and N=(0,1) which touch or cross the line x-y=2. Example: For n=3 there are 6 paths EEENNN, EENENN, EENNEN, EENNNE, ENEENN and NEEENN. - Herbert Kociemba, May 23 2004
Number of dissections of a convex (n+3)-gon by noncrossing diagonals into several regions, exactly n-2 of which are triangular. Example: a(3)=6 because the convex hexagon ABCDEF is dissected by any of the diagonals AC, BD, CE, DF, EA, FB into regions containing exactly 1 triangle. - Emeric Deutsch, May 31 2004
Number of UUU's (triple rises), where U=(1,1), in all Dyck paths of semilength n+1. Example: a(3)=6 because we have UD(UUU)DDD, (UUU)DDDUD, (UUU)DUDDD, (UUU)DDUDD and (U[UU)U]DDDD, the triple rises being shown between parentheses. - Emeric Deutsch, Jun 03 2004
Inverse binomial transform of A026389. - Ross La Haye, Mar 05 2005
Sum of the jump-lengths of all full binary trees with n internal nodes. In the preorder traversal of a full binary tree, any transition from a node at a deeper level to a node on a strictly higher level is called a jump; the positive difference of the levels is called the jump distance; the sum of the jump distances in a given full binary tree is called the jump-length. - Emeric Deutsch, Jan 18 2007
a(n) = number of convex polyominoes (A005436) of perimeter 2n+4 that are directed but not parallelogram polyominoes, because the directed convex polyominoes are counted by the central binomial coefficient binomial(2n,n) and the subset of parallelogram polyominoes is counted by the Catalan number C(n+1) = binomial(2n+2,n+1)/(n+2) and a(n) = binomial(2n,n) - C(n+1). - David Callan, Nov 29 2007
a(n) = number of DUU's in all Dyck paths of semilength n+1. Example: a(3)=6 because we have UU(DUU)DDD, U(DUU)UDDD, U(DUU)DUDD, UDU(DUU)DD, U(DUU)DDUD, UUD(DUU)DD, the DUU's being shown between parentheses and no other Dyck path of semilength 4 contains a DUU. - David Callan, Jul 25 2008
C(2n,n-m) is the number of Dyck-type walks such that their graphs have one marked edge passed 2m times and the other edges are passed 2 times counting "there and back" directions. - Oleksiy Khorunzhiy, Jan 09 2015
Number of paths in the half-plane x >= 0, from (0,0) to (2n,4), and consisting of steps U=(1,1) and D=(1,-1). For example, for n=3, we have the 6 paths: UUUUUD, UUUUDU, UUUDUU, UUDUUU, UDUUUU, DUUUUU, DUUUUU. - José Luis Ramírez Ramírez, Apr 19 2015

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 828.
  • C. Lanczos, Applied Analysis. Prentice-Hall, Englewood Cliffs, NJ, 1956, p. 517.
  • 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. A006659.
Diagonal 5 of triangle A100257.
Cf. binomial(k*n, n-k): A000027 (k=1), this sequence (k=2), A004321 (k=3), A004334 (k=4), A004347 (k=5), A004361 (k=6), A004375 (k=7), A004389 (k=8), A281580 (k=9).
Cf. binomial(2*n+m, n): A000984 (m = 0), A001700 (m = 1), A001791 (m = 2), A002054 (m = 3), A003516 (m = 5), A002696 (m = 6), A030053 - A030056, A004310 - A004318.

Programs

  • GAP
    List([2..30], n-> Binomial(2*n,n-2)); # G. C. Greubel, Mar 21 2019
  • Haskell
    a002694 n = a007318' (2 * n) (n - 2)  -- Reinhard Zumkeller, Jun 18 2012
    
  • Magma
    [Binomial(2*n, n-2): n in [2..30]]; // Vincenzo Librandi, Apr 20 2015
    
  • Maple
    a:=n->sum(binomial(n,j-1)*binomial(n,j+1),j=1..n): seq(a(n), n=2..25); # Zerinvary Lajos, Nov 26 2006
  • Mathematica
    CoefficientList[ Series[ 16/(((Sqrt[1 - 4 x] + 1)^4)*Sqrt[1 - 4 x]), {x, 0, 23}], x] (* Robert G. Wilson v, Aug 08 2011 *)
    Table[Binomial[2n,n-2],{n,2,30}] (* Harvey P. Dale, Jun 12 2014 *)
  • PARI
    {a(n) = binomial(2*n,n-2)}; \\ G. C. Greubel, Mar 21 2019
    
  • Sage
    [binomial(2*n,n-2) for n in (2..30)] # G. C. Greubel, Mar 21 2019
    

Formula

a(n) = A067310(n, 1) as this is number of ways of arranging n chords on a circle (handshakes between 2n people across a table) with exactly 1 simple intersection. - Henry Bottomley, Oct 07 2002
E.g.f.: exp(2*x) * BesselI(2, 2*x). - Vladeta Jovovic, Aug 21 2003
G.f.: (1-sqrt(1-4*z))^4/(16*z^2*sqrt(1-4*z)). - Emeric Deutsch, Jan 28 2004
a(n) = Sum_{k=0..n} C(n, k)*C(n, k+2). - Paul Barry, Sep 20 2004
D-finite with recurrence: -(n-2)*(n+2)*a(n) + 2*n*(2*n-1)*a(n-1) = 0. - R. J. Mathar, Dec 04 2012
G.f.: z^2*C(z)^4/(1-2*z*C(z)), where C(z) is the g.f. of Catalan numbers. - José Luis Ramírez Ramírez, Apr 19 2015
a(n) = Sum_{k=1..n} binomial(2*n-k,n-k-1). - Vladimir Kruchinin, Oct 22 2016
G.f.: x^2* 2F1(5/2,3;5;4*x). - R. J. Mathar, Jan 27 2020
From Amiram Eldar, May 16 2022: (Start)
Sum_{n>=2} 1/a(n) = 23/6 - 13*Pi/(9*sqrt(3)).
Sum_{n>=2} (-1)^n/a(n) = 106*log(phi)/(5*sqrt(5)) - 37/10, where phi is the golden ratio (A001622). (End)
From Peter Bala, Oct 13 2024: (Start)
a(n) = Integral_{x = 0..4} x^n * w(x) dx, where the weight function w(x) = 1/(2*Pi) * (x^2 - 4*x + 2)/sqrt(x*(4 - x)).
G.f. x^2 * B(x) * C(x)^4, where B(x) = 1/sqrt(1 - 4*x) is the g.f. of the central binomial coefficients A000984 and C(x) = (1 - sqrt(1 - 4*x))/(2*x) is the g.f. of the Catalan numbers A000108. (End)

A051924 a(n) = binomial(2*n,n) - binomial(2*n-2,n-1); or (3n-2)*C(n-1), where C = Catalan numbers (A000108).

Original entry on oeis.org

1, 4, 14, 50, 182, 672, 2508, 9438, 35750, 136136, 520676, 1998724, 7696444, 29716000, 115000920, 445962870, 1732525830, 6741529080, 26270128500, 102501265020, 400411345620, 1565841089280, 6129331763880, 24014172955500, 94163002754652, 369507926510352
Offset: 1

Views

Author

Barry E. Williams, Dec 19 1999

Keywords

Comments

Number of partitions with Ferrers plots that fit inside an n X n box, but not in an n-1 X n-1 box. - Wouter Meeussen, Dec 10 2001
From Benoit Cloitre, Jan 29 2002: (Start)
Let m(1,j)=j, m(i,1)=i and m(i,j) = m(i-1,j) + m(i,j-1); then a(n) = m(n,n):
1 2 3 4 ...
2 4 7 11 ...
3 7 14 25 ...
4 11 25 50 ... (End)
This sequence also gives the number of clusters and non-crossing partitions of type D_n. - F. Chapoton, Jan 31 2005
If Y is a 2-subset of a 2n-set X then a(n) is the number of (n+1)-subsets of X intersecting Y. - Milan Janjic, Nov 18 2007
Prefaced with a 1: (1, 1, 4, 14, 50, ...) and convolved with the Catalan sequence = A097613: (1, 2, 7, 25, 91, ...). - Gary W. Adamson, May 15 2009
Total number of up steps before the second return in all Dyck n-paths. - David Scambler, Aug 21 2012
Conjecture: a(n) mod n^2 = n+2 iff n is an odd prime. - Gary Detlefs, Feb 19 2013
First differences of A000984 and A030662. - J. M. Bergot, Jun 22 2013
From R. J. Mathar, Jun 30 2013: (Start)
Equivalent to the Meeussen comment and the Bergot comment: The array view of A007318 is
1, 1, 1, 1, 1, 1,
1, 2, 3, 4, 5, 6,
1, 3, 6, 10, 15, 21,
1, 4, 10, 20, 35, 56,
1, 5, 15, 35, 70, 126,
1, 6, 21, 56, 126, 252,
and a(n) are the hook sums Sum_{k=0..n} A(n,k) + Sum_{r=0..n-1} A(r,n). (End)
From Gus Wiseman, Apr 12 2019: (Start)
Equivalent to Wouter Meeussen's comment, a(n) is the number of integer partitions (of any positive integer) such that the maximum of the length and the largest part is n. For example, the a(1) = 1 through a(3) = 14 partitions are:
(1) (2) (3)
(11) (31)
(21) (32)
(22) (33)
(111)
(211)
(221)
(222)
(311)
(321)
(322)
(331)
(332)
(333)
(End)
Coxeter-Catalan numbers for Coxeter groups of type D_n [Armstrong]. - N. J. A. Sloane, Mar 09 2022
a(n+1) is the number of ways that a best of n pairs contest with early termination can go. For example, the first stage of an association football (soccer) penalty-kick shoot out has n=5 pairs of shots and there are a(6)=672 distinct ways it can go. For n=2 pairs, writing G for goal and M for miss, and listing the up-to-four shots in chronological order with teams alternating shots, the n(3)=14 possibilities are MMMM, MMMG, MMGM, MMGG, MGM, MGGM, MGGG, GMMM, GMMG, GMG, GGMM, GGMG, GGGM, and GGGG. Not all four shots are taken in two cases because it becomes impossible for one team to overcome the lead of the other team. - Lee A. Newberg, Jul 20 2024

Examples

			Sums of {1}, {2, 1, 1}, {2, 2, 3, 3, 2, 1, 1}, {2, 2, 4, 5, 7, 6, 7, 5, 5, 3, 2, 1, 1}, ...
		

References

  • Drew Armstrong, Generalized Noncrossing Partitions and Combinatorics of Coxeter Groups, Mem. Amer. Math. Soc. 202 (2009), no. 949, x+159. MR 2561274 16; See Table 2.8.

Crossrefs

Left-central elements of the (1, 2)-Pascal triangle A029635.
Column sums of A096771.
Cf. A000108, A024482 (diagonal from 2), A076540 (diagonal from 3), A000124 (row from 2), A004006 (row from 3), A006522 (row from 4).
Cf. A128064; first differences of A000984.
Cf. A097613.

Programs

  • Haskell
    a051924 n = a051924_list !! (n-1)
    a051924_list = zipWith (-) (tail a000984_list) a000984_list
    -- Reinhard Zumkeller, May 25 2013
    
  • Magma
    [Binomial(2*n, n)-Binomial(2*n-2, n-1): n in [1..28]]; // Vincenzo Librandi, Dec 21 2016
  • Maple
    C:= n-> binomial(2*n, n)/(n+1): seq((n+1)*C(n)-n*C(n-1), n=1..25); # Emeric Deutsch, Jan 08 2008
    Z:=(1-z-sqrt(1-4*z))/sqrt(1-4*z): Zser:=series(Z, z=0, 32): seq(coeff(Zser, z, n), n=1..24); # Zerinvary Lajos, Jan 01 2007
    a := n -> 2^(-2+2*n)*GAMMA(-1/2+n)*(3*n-2)/(sqrt(Pi)*GAMMA(1+n)):
    seq(simplify(a(n)), n=1..24); # Peter Luschny, Dec 14 2015
  • Mathematica
    Table[Binomial[2n,n]-Binomial[2n-2,n-1],{n,30}] (* Harvey P. Dale, Jan 15 2012 *)
  • PARI
    a(n)=binomial(2*n,n)-binomial(2*n-2,n-1) \\ Charles R Greathouse IV, Jun 25 2013
    
  • PARI
    {a(n)=polcoeff((1-x) / sqrt(1-4*x +x*O(x^n)) - 1,n)}
    for(n=1,30,print1(a(n),", ")) \\ Paul D. Hanna, Nov 08 2014
    
  • PARI
    {a(n)=polcoeff( sum(m=1, n, x^m * sum(k=0, m, binomial(m, k)^2 * x^k) / (1-x +x*O(x^n))^(2*m)), n)}
    for(n=1, 30, print1(a(n), ", ")) \\ Paul D. Hanna, Nov 08 2014
    
  • Sage
    a = lambda n: 2^(-2+2*n)*gamma(n-1/2)*(3*n-2)/(sqrt(pi)*gamma(1+n))
    [a(n) for n in (1..120)] # Peter Luschny, Dec 14 2015
    

Formula

G.f.: (1-x) / sqrt(1-4*x) - 1. - Paul D. Hanna, Nov 08 2014
G.f.: Sum_{n>=1} x^n/(1-x)^(2*n) * Sum_{k=0..n} C(n,k)^2 * x^k. - Paul D. Hanna, Nov 08 2014
a(n+1) = binomial(2*n, n) + 2*Sum_{i=0..n-1} binomial(n+i, i) (V's in Pascal's Triangle). - Jon Perry Apr 13 2004
a(n) = n*C(n-1) - (n-1)*C(n-2), where C(n) = A000108(n) = Catalan(n). For example, a(5) = 50 = 5*C(4) - 4*C(3) - 5*14 - 3*5 = 70 - 20. Triangle A128064 as an infinite lower triangular matrix * A000108 = A051924 prefaced with a 1: (1, 1, 4, 14, 50, 182, ...). - Gary W. Adamson, May 15 2009
Sum of 3 central terms of Pascal's triangle: 2*C(2+2*n, n)+C(2+2*n, 1+n). - Zerinvary Lajos, Dec 20 2005
a(n+1) = A051597(2n,n). - Philippe Deléham, Nov 26 2006
The sequence 1,1,4,... has a(n) = C(2*n,n)-C(2*(n-1),n-1) = 0^n+Sum_{k=0..n} C(n-1,k-1)*A002426(k), and g.f. given by (1-x)/(1-2*x-2*x^2/(1-2*x-x^2/(1-2*x-x^2/(1-2*x-x^2/(1-.... (continued fraction). - Paul Barry, Oct 17 2009
a(n) = (3*n-2)*(2*n-2)!/(n*(n-1)!^2) = A001700(n) + A001791(n-1). - David Scambler, Aug 21 2012
D-finite with recurrence: a(n) = 2*(3*n-2)*(2*n-3)*a(n-1)/(n*(3*n-5)). - Alois P. Heinz, Apr 25 2014
a(n) = 2^(-2+2*n)*Gamma(-1/2+n)*(3*n-2)/(sqrt(Pi)*Gamma(1+n)). - Peter Luschny, Dec 14 2015
a(n) ~ (3/4)*4^n*(1-(7/24)/n-(7/128)/n^2-(85/3072)/n^3-(581/32768)/n^4-(2611/262144)/n^5)/sqrt(n*Pi). - Peter Luschny, Dec 16 2015
E.g.f.: ((1 - x)*BesselI(0,2*x) + x*BesselI(1,2*x))*exp(2*x) - 1. - Ilya Gutkovskiy, Dec 20 2016
a(n) = 2 * A097613(n) for n > 1. - Bruce J. Nicholson, Jan 06 2019
Sum_{n>=1} a(n)/8^n = 7/(4*sqrt(2)) - 1. - Amiram Eldar, May 06 2023

Extensions

Edited by N. J. A. Sloane, May 03 2008, at the suggestion of R. J. Mathar

A163493 Number of binary strings of length n which have the same number of 00 and 01 substrings.

Original entry on oeis.org

1, 2, 2, 3, 6, 9, 15, 30, 54, 97, 189, 360, 675, 1304, 2522, 4835, 9358, 18193, 35269, 68568, 133737, 260802, 509132, 995801, 1948931, 3816904, 7483636, 14683721, 28827798, 56637969, 111347879, 219019294, 431043814, 848764585, 1672056525, 3295390800, 6497536449
Offset: 0

Views

Author

Keywords

Comments

A variation of problem 11424 in the American Mathematical Monthly. Terms were brute-force calculated using Maple 10.
Proposed Problem 11610 in the Dec 2011 A.M.M.
From Gus Wiseman, Jul 27 2021: (Start)
Also the antidiagonal sums of the matrices counting integer compositions by length and alternating sum (A345197). So a(n) is the number of integer compositions of n + 1 of length (n - s + 3)/2, where s is the alternating sum of the composition. For example, the a(0) = 1 through a(6) = 7 compositions are:
(1) (2) (3) (4) (5) (6) (7)
(11) (21) (31) (41) (51) (61)
(121) (122) (123) (124)
(221) (222) (223)
(1112) (321) (322)
(1211) (1122) (421)
(1221) (1132)
(2112) (1231)
(2211) (2122)
(2221)
(3112)
(3211)
(11131)
(12121)
(13111)
For a bijection with the main (binary string) interpretation, take the run-lengths of each binary string of length n + 1 that satisfies the condition and starts with 1.
(End)

Examples

			1 + 2*x + 2*x^2 + 3*x^3 + 6*x^4 + 9*x^5 + 15*x^6 + 30*x^7 + 54*x^8 + 97*x^9 + ...
From _Gus Wiseman_, Jul 27 2021: (Start)
The a(0) = 1 though a(6) = 15 binary strings:
  ()  (0)  (1,0)  (0,0,1)  (0,0,1,0)  (0,0,1,1,0)  (0,0,0,1,0,1)
      (1)  (1,1)  (1,1,0)  (0,0,1,1)  (0,0,1,1,1)  (0,0,1,0,0,1)
                  (1,1,1)  (0,1,0,0)  (0,1,1,0,0)  (0,0,1,1,1,0)
                           (1,0,0,1)  (1,0,0,1,0)  (0,0,1,1,1,1)
                           (1,1,1,0)  (1,0,0,1,1)  (0,1,0,0,0,1)
                           (1,1,1,1)  (1,0,1,0,0)  (0,1,1,1,0,0)
                                      (1,1,0,0,1)  (1,0,0,1,1,0)
                                      (1,1,1,1,0)  (1,0,0,1,1,1)
                                      (1,1,1,1,1)  (1,0,1,1,0,0)
                                                   (1,1,0,0,1,0)
                                                   (1,1,0,0,1,1)
                                                   (1,1,0,1,0,0)
                                                   (1,1,1,0,0,1)
                                                   (1,1,1,1,1,0)
                                                   (1,1,1,1,1,1)
(End)
		

Crossrefs

Antidiagonal sums of the matrices A345197.
Row sums of A345907.
Taking diagonal instead of antidiagonal sums gives A345908.
A011782 counts compositions (or binary strings).
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).
Compositions of n, 2n, or 2n+1 with alternating/reverse-alternating sum k:
- k = 0: counted by A088218, 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, 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

  • Maple
    with(combinat): count := proc(n) local S, matches, A, k, i; S := subsets(\{seq(i, i=1..n)\}): matches := 0: while not S[finished] do A := S[nextvalue](): k := 0: for i from 1 to n-1 do: if not (i in A) and not (i+1 in A) then k := k + 1: fi: if not (i in A) and (i+1 in A) then k := k - 1: fi: od: if (k = 0) then matches := matches + 1: fi: end do; return(matches); end proc:
    # second Maple program:
    b:= proc(n, l, t) option remember; `if`(n-abs(t)<0, 0, `if`(n=0, 1,
          add(b(n-1, i, t+`if`(l=0, (-1)^i, 0)), i=0..1)))
        end:
    a:= n-> b(n, 1, 0):
    seq(a(n), n=0..36);  # Alois P. Heinz, Mar 20 2024
  • Mathematica
    a[0] = 1; a[n_] := Sum[Binomial[2*k - 1, k]*Binomial[n - 2*k, k] + Binomial[2*k, k]*Binomial[n - 2*k - 1, k], {k, 0, n/3}];
    Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Nov 28 2017, after Joel B. Lewis *)
    Table[Length[Select[Tuples[{0,1},n],Count[Partition[#,2,1],{0,0}]==Count[Partition[#,2,1],{0,1}]&]],{n,0,10}] (* Gus Wiseman, Jul 27 2021 *)
    a[0]:=1; a[n_]:=(1 + 3*HypergeometricPFQ[{1/2, 1-3*n/8, (1-n)/3, (2-n)/3, -n/3},{1, (1-n)/2, 1-n/2, -3*n/8}, -27])/2; Array[a,37,0] (* Stefano Spezia, Apr 26 2024 *)
  • Python
    from math import comb
    def A163493(n): return 2+sum((x:=comb((k:=m<<1)-1,m)*comb(n-k,m))+(x*(n-3*m)<<1)//(n-k) for m in range(1,n//3+1)) if n else 1 # Chai Wah Wu, May 01 2024

Formula

G.f.: 1/2/(1-x) + (1+2*x)/2/sqrt((1-x)*(1-2*x)*(1+x+2*x^2)). - Richard Stanley, corrected Apr 29 2011
G.f.: (1 + sqrt( 1 + 4*x / ((1 - x) * (1 - 2*x) * (1 + x + 2*x^2)))) / (2*(1 - x)). - Michael Somos, Jan 30 2012
a(n) = sum( binomial(2*k-1, k)*binomial(n-2*k,k) + binomial(2*k, k)*binomial(n-2*k-1, k), k=0..floor(n/3)). - Joel B. Lewis, May 21 2011
Conjecture: -n*a(n) +(2+n)*a(n-1) +(3n-12)*a(n-2) +(12-n)*a(n-3) +(2n-18)*a(n-4)+(56-12n)*a(n-5) +(8n-40)*a(n-6)=0. - R. J. Mathar, Nov 28 2011
G.f. y = A(x) satisfies x = (1 - x) * (1 - 2*x) * (1 + x + 2*x^2) * y * (y * (1 - x) - 1). - Michael Somos, Jan 30 2012
Sequence a(n) satisfies 0 = a(n) * (n^2-2*n) + a(n-1) * (-3*n^2+8*n-2) + a(n-2) * (3*n^2-10*n+2) + a(n-3) * (-5*n^2+18*n-6) + a(n-4) * (8*n^2-34*n+22) + a(n-5) * (-4*n^2+20*n-16) except if n=1 or n=2. - Michael Somos, Jan 30 2012
a(n) = (1 + 3*hypergeom([1/2, 1-3*n/8, (1-n)/3, (2-n)/3, -n/3],[1, (1-n)/2, 1-n/2, -3*n/8],-27))/2 for n > 0. - Stefano Spezia, Apr 26 2024
a(n) ~ 2^n / sqrt(Pi*n). - Vaclav Kotesovec, Apr 26 2024

A345910 Numbers k such that the k-th composition in standard order (row k of A066099) has alternating sum -1.

Original entry on oeis.org

6, 20, 25, 27, 30, 72, 81, 83, 86, 92, 98, 101, 103, 106, 109, 111, 116, 121, 123, 126, 272, 289, 291, 294, 300, 312, 322, 325, 327, 330, 333, 335, 340, 345, 347, 350, 360, 369, 371, 374, 380, 388, 393, 395, 398, 402, 405, 407, 410, 413, 415, 420, 425, 427
Offset: 1

Views

Author

Gus Wiseman, Jul 01 2021

Keywords

Comments

The alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i.
The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.

Examples

			The sequence of terms together with the corresponding compositions begins:
      6: (1,2)
     20: (2,3)
     25: (1,3,1)
     27: (1,2,1,1)
     30: (1,1,1,2)
     72: (3,4)
     81: (2,4,1)
     83: (2,3,1,1)
     86: (2,2,1,2)
     92: (2,1,1,3)
     98: (1,4,2)
    101: (1,3,2,1)
    103: (1,3,1,1,1)
    106: (1,2,2,2)
    109: (1,2,1,2,1)
		

Crossrefs

These compositions are counted by A001791.
A version using runs of binary digits is A031444.
These are the positions of -1's in A124754.
The opposite (positive 1) version is A345909.
The reverse version is A345912.
The version for alternating sum of prime indices is A345959.
Standard compositions: A000120, A066099, A070939, A124754, A228351, A344618.
A000041 counts partitions of 2n with alternating sum 0, ranked by A000290.
A000070 counts partitions of 2n+1 with alternating sum 1, ranked by A001105.
A011782 counts compositions.
A097805 counts compositions by sum and alternating sum.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A316524 gives the alternating sum of prime indices (reverse: A344616).
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, 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, 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

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[ Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}];
    Select[Range[0,100],ats[stc[#]]==-1&]

A345912 Numbers k such that the k-th composition in standard order (row k of A066099) has reverse-alternating sum -1.

Original entry on oeis.org

5, 18, 23, 25, 29, 68, 75, 78, 81, 85, 90, 95, 98, 103, 105, 109, 114, 119, 121, 125, 264, 275, 278, 284, 289, 293, 298, 303, 308, 315, 318, 322, 327, 329, 333, 338, 343, 345, 349, 356, 363, 366, 369, 373, 378, 383, 388, 395, 398, 401, 405, 410, 415, 418, 423
Offset: 1

Views

Author

Gus Wiseman, Jul 01 2021

Keywords

Comments

The reverse-alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(k-i) y_i.
The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.

Examples

			The sequence of terms together with the corresponding compositions begins:
      5: (2,1)
     18: (3,2)
     23: (2,1,1,1)
     25: (1,3,1)
     29: (1,1,2,1)
     68: (4,3)
     75: (3,2,1,1)
     78: (3,1,1,2)
     81: (2,4,1)
     85: (2,2,2,1)
     90: (2,1,2,2)
     95: (2,1,1,1,1,1)
     98: (1,4,2)
    103: (1,3,1,1,1)
    105: (1,2,3,1)
		

Crossrefs

These compositions are counted by A001791.
These are the positions of -1's in A344618.
The non-reverse version is A345910.
The opposite (positive 1) version is A345911.
The version for Heinz numbers of partitions is A345959.
Standard compositions: A000120, A066099, A070939, A228351, A124754, A344618.
A000041 counts partitions of 2n with alternating sum 0, ranked by A000290.
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.
A344611 counts partitions of 2n with reverse-alternating sum >= 0.
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, 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, 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

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    sats[y_]:=Sum[(-1)^(i-Length[y])*y[[i]],{i,Length[y]}];
    Select[Range[0,100],sats[stc[#]]==-1&]

A345917 Numbers k such that the k-th composition in standard order (row k of A066099) has alternating sum > 0.

Original entry on oeis.org

1, 2, 4, 5, 7, 8, 9, 11, 14, 16, 17, 18, 19, 21, 22, 23, 26, 28, 29, 31, 32, 33, 34, 35, 37, 38, 39, 42, 44, 45, 47, 52, 56, 57, 59, 62, 64, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75, 76, 77, 78, 79, 82, 84, 85, 87, 88, 89, 90, 91, 93, 94, 95, 100, 104, 105, 107
Offset: 1

Views

Author

Gus Wiseman, Jul 08 2021

Keywords

Comments

The alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i.
The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.

Examples

			The initial terms and the corresponding compositions:
     1: (1)
     2: (2)
     4: (3)
     5: (2,1)
     7: (1,1,1)
     8: (4)
     9: (3,1)
    11: (2,1,1)
    14: (1,1,2)
    16: (5)
    17: (4,1)
    18: (3,2)
    19: (3,1,1)
    21: (2,2,1)
    22: (2,1,2)
		

Crossrefs

The version for Heinz numbers of partitions is A026424.
These compositions are counted by A027306.
These are the positions of terms > 0 in A124754.
The weak (k >= 0) version is A345913.
The reverse-alternating version is A345918.
The opposite (k < 0) version is A345919.
A000041 counts partitions of 2n with alternating sum 0, ranked by A000290.
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).
A345197 counts compositions by sum, length, and alternating sum.
Standard compositions: A000120, A066099, A070939, A228351, A124754, A344618.
Compositions of n, 2n, or 2n+1 with alternating/reverse-alternating sum k:
- k = 0: counted by A088218, 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, 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

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}];
    Select[Range[0,100],ats[stc[#]]>0&]

A037952 a(n) = binomial(n, floor((n-1)/2)).

Original entry on oeis.org

0, 1, 1, 3, 4, 10, 15, 35, 56, 126, 210, 462, 792, 1716, 3003, 6435, 11440, 24310, 43758, 92378, 167960, 352716, 646646, 1352078, 2496144, 5200300, 9657700, 20058300, 37442160, 77558760, 145422675, 300540195, 565722720, 1166803110, 2203961430, 4537567650
Offset: 0

Views

Author

Keywords

Comments

First differences of central binomial coefficients: a(n) = A001405(n+1) - A001405(n).
The maximum size of an intersecting (or proper) antichain on an n-set. - Vladeta Jovovic, Dec 27 2000
Number of ordered trees with n+1 edges, having root of degree at least 2 and nonroot nodes of outdegree 0 or 2. - Emeric Deutsch, Aug 02 2002
a(n)=number of Dyck (n+1)-paths that are symmetric but not prime. A prime Dyck path is one that returns to the x-axis only at its terminal point. For example a(3)=3 counts UDUUDDUD, UUDDUUDD, UDUDUDUD. - David Callan, Dec 09 2004
Number of involutions of [n+2] containing the pattern 132 exactly once. For example, a(3)=3 because we have 1'3'2'45, 42'5'13' and 52'4'3'1 (the entries corresponding to the pattern 132 are "primed"). - Emeric Deutsch, Nov 17 2005
Also number of ways to put n eggs in floor(n/2) baskets where order of the baskets matters and all baskets have at least 1 egg. - Ben Paul Thurston, Sep 30 2006
For n >= 1 the number of standard Young tableaux with shapes corresponding to partitions into at most 2 distinct parts. - Joerg Arndt, Oct 25 2012
It seems that 3, 4, 10, ... are Colbourn's Covering Array Numbers CAN(2,k,2). - Ryan Dougherty, May 27 2015
Essentially the same as A007007. - Georg Fischer, Oct 02 2018
a(n) is the number of subsets of {1,2,...,n} that contain exactly 1 more odd than even elements. For example, for n = 6, a(6) = 15 and the 15 sets are {1}, {3}, {5}, {1,2,3}, {1,2,5}, {1,3,4}, {1,3,6}, {1,4,5}, {1,5,6}, {2,3,5}, {3,4,5}, {3,5,6}, {1,2,3,4,5}, {1,2,3,5,6}, {1,3,4,5,6}. - Enrique Navarrete, Dec 21 2019
a(n) is the number of lattice paths of n steps taken from the step set {U=(1,1), D=(1,-1)} that start at the origin, never go below the x-axis, and end strictly above the x-axis; more succinctly, proper left factors of Dyck paths. For example, a(3)=3 counts UUU, UUD, UDU, and a(4)=4 counts UUUU, UUUD, UUDU, UDUU. - David Callan and Emeric Deutsch, Jan 25 2021
For n >= 3, a(n) is also the number of pinnacle sets in the (n-2)-Plummer-Toft graph. - Eric W. Weisstein, Sep 11 2024

Crossrefs

Cf. A007007, A032263, A014495 (partial sums), A001405 (partial sums + 1).
Cf. A265848.

Programs

  • Haskell
    a037952 n = a037952_list !! n
    a037952_list = zipWith (-) (tail a001405_list) a001405_list
    -- Reinhard Zumkeller, Mar 04 2012
    
  • Magma
    [Binomial(n, Floor((n-1)/2)): n in [0..40]]; // G. C. Greubel, Jun 21 2022
    
  • Maple
    a:= n-> binomial(n, floor((n-1)/2)):
    seq(a(n), n=0..35);  # Alois P. Heinz, Sep 19 2017
  • Mathematica
    Table[ Binomial[n, Floor[n/2]], {n, 0, 35}]//Differences (* Jean-François Alcover, Jun 10 2013 *)
    f[n_] := Binomial[n, Floor[(n-1)/2]]; Array[f, 35, 0] (* Robert G. Wilson v, Nov 13 2014 *)
  • PARI
    a(n) = binomial(n, (n-1)\2); \\ Altug Alkan, Oct 03 2018
    
  • SageMath
    [binomial(n, (n-1)//2) for n in (0..40)] # G. C. Greubel, Jun 21 2022

Formula

E.g.f.: BesselI(1, 2*x) + BesselI(2, 2*x). - Vladeta Jovovic, Apr 28 2003
O.g.f.: (1-sqrt(1-4x^2))/(x - 2x^2 + x*sqrt(1-4x^2)).
Convolution of A001405 and A126120 shifted right: g001405(x)*g126120(x) = g037952(x)/x. - Philippe Deléham, Mar 17 2007
D-finite with recurrence: (n+2)*a(n) + (-n-2)*a(n-1) + 2*(-2*n+1)*a(n-2) + 4*(n-2)*a(n-3) = 0. - R. J. Mathar, Jan 25 2013. Proved by Robert Israel, Nov 13 2014
For n > 0: a(n) = A265848(n,0). - Reinhard Zumkeller, Dec 24 2015
a(n) = binomial(n, (n-2)/2) = A001791(n/2), n even; a(n) = binomial(n, (n+1)/2) = A001700((n-1)/2), n odd. - Enrique Navarrete, Dec 21 2019
From R. J. Mathar, Sep 23 2021: (Start)
A001405(n) = a(n) + A000108(n/2), where A(.)=0 for non-integer arguments.
a(n) = Sum_{m=1..n} A053121(n,m) [comment Callan-Deutsch].
a(2n+1) = A000984(n+1)/2. (End)
a(n) = Sum_{k=2..n} A143359(n,k). [Callan's 2004 comment]. - R. J. Mathar, Sep 24 2021
From Amiram Eldar, Sep 27 2024: (Start)
Sum_{n>=1} 1/a(n) = 1 + Pi/sqrt(3).
Sum_{n>=1} (-1)^(n+1)/a(n) = (3 - Pi/sqrt(3))/9. (End)

A092392 Triangle read by rows: T(n,k) = C(2*n - k,n), 0 <= k <= n.

Original entry on oeis.org

1, 2, 1, 6, 3, 1, 20, 10, 4, 1, 70, 35, 15, 5, 1, 252, 126, 56, 21, 6, 1, 924, 462, 210, 84, 28, 7, 1, 3432, 1716, 792, 330, 120, 36, 8, 1, 12870, 6435, 3003, 1287, 495, 165, 45, 9, 1, 48620, 24310, 11440, 5005, 2002, 715, 220, 55, 10, 1, 184756, 92378, 43758, 19448, 8008, 3003, 1001, 286, 66, 11, 1
Offset: 0

Views

Author

Ralf Stephan, Mar 21 2004

Keywords

Comments

First column is C(2*n,n) or A000984. Central coefficients are C(3*n,n) or A005809. - Paul Barry, Oct 14 2009
T(n,k) = A046899(n,n-k), k = 0..n-1. - Reinhard Zumkeller, Jul 27 2012
From Peter Bala, Nov 03 2015: (Start)
Viewed as the square array [binomial (2*n + k, n + k)]n,k>=0 this is the generalized Riordan array ( 1/sqrt(1 - 4*x),c(x) ) in the sense of the Bala link, where c(x) is the o.g.f. for A000108.
The square array factorizes as ( 1/(2 - c(x)),x*c(x) ) * ( 1/(1 - x),1/(1 - x) ), which equals the matrix product of A100100 with the square Pascal matrix [binomial (n + k,k)]n,k>=0. See the example below. (End)

Examples

			From _Paul Barry_, Oct 14 2009: (Start)
Triangle begins
  1,
  2, 1,
  6, 3, 1,
  20, 10, 4, 1,
  70, 35, 15, 5, 1,
  252, 126, 56, 21, 6, 1,
  924, 462, 210, 84, 28, 7, 1,
  3432, 1716, 792, 330, 120, 36, 8, 1
Production array is
  2, 1,
  2, 1, 1,
  2, 1, 1, 1,
  2, 1, 1, 1, 1,
  2, 1, 1, 1, 1, 1,
  2, 1, 1, 1, 1, 1, 1,
  2, 1, 1, 1, 1, 1, 1, 1,
  2, 1, 1, 1, 1, 1, 1, 1, 1,
  2, 1, 1, 1, 1, 1, 1, 1, 1, 1 (End)
As a square array = A100100 * square Pascal matrix:
  /1   1  1  1 ...\   / 1          \/1 1  1  1 ...\
  |2   3  4  5 ...|   | 1 1        ||1 2  3  4 ...|
  |6  10 15 21 ...| = | 3 2 1      ||1 3  6 10 ...|
  |20 35 56 84 ...|   |10 6 3 1    ||1 4 10 20 ...|
  |70 ...         |   |35 ...      ||1 ...        |
- _Peter Bala_, Nov 03 2015
		

Crossrefs

Programs

  • Haskell
    a092392 n k = a092392_tabl !! (n-1) !! (k-1)
    a092392_row n = a092392_tabl !! (n-1)
    a092392_tabl = map reverse a046899_tabl
    -- Reinhard Zumkeller, Jul 27 2012
    
  • Magma
    /* As a triangle */ [[Binomial(2*n-k, n): k in [0..n]]: n in [0..10]]; // G. C. Greubel, Nov 22 2017
  • Maple
    A092392 := proc(n,k)
        binomial(2*n-k,n-k) ;
    end proc:
    seq(seq(A092392(n,k),k=0..n),n=0..10) ; # R. J. Mathar, Feb 06 2015
  • Mathematica
    Table[Binomial[2 n - k, n], {n, 0, 10}, {k, 0, n}] // Flatten (* Michael De Vlieger, Mar 19 2016 *)
  • Maxima
    C(x):=(1-sqrt(1-4*x))/2;
    A(x,y):=(1/sqrt(1-4*x))/(1-y*C(x));
    taylor(A(x,y),y,0,10,x,0,10); /* Vladimir Kruchinin, Mar 19 2016 */
    
  • PARI
    for(n=0,10, for(k=0,n, print1(binomial(2*n - k,n), ", "))) \\ G. C. Greubel, Nov 22 2017
    

Formula

As a number triangle, this is T(n, k) = if(k <= n, C(2*n - k, n), 0). Its row sums are C(2*n + 1, n + 1) = A001700. Its diagonal sums are A176287. - Paul Barry, Apr 23 2005
G.f. of column k: 2^k/[sqrt(1 - 4*x)*(1 + sqrt(1 - 4*x))^k].
As a number triangle, this is the Riordan array (1/sqrt(1 - 4*x), x*c(x)), c(x) the g.f. of A000108. - Paul Barry, Jun 24 2005
G.f.: A(x,y)=1/sqrt(1 - 4*x)/(1-y*x*C(x)), where C(x) is g.f. of Catalan numbers. - Vladimir Kruchinin, Mar 19 2016

Extensions

Diagonal sums comment corrected by Paul Barry, Apr 14 2010
Offset corrected by R. J. Mathar, Feb 08 2013

A345911 Numbers k such that the k-th composition in standard order (row k of A066099) has reverse-alternating sum 1.

Original entry on oeis.org

1, 6, 7, 20, 21, 26, 27, 30, 31, 72, 73, 82, 83, 86, 87, 92, 93, 100, 101, 106, 107, 110, 111, 116, 117, 122, 123, 126, 127, 272, 273, 290, 291, 294, 295, 300, 301, 312, 313, 324, 325, 330, 331, 334, 335, 340, 341, 346, 347, 350, 351, 360, 361, 370, 371, 374
Offset: 1

Views

Author

Gus Wiseman, Jul 01 2021

Keywords

Comments

The reverse-alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(k-i) y_i.
The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.

Examples

			The sequence of terms together with the corresponding compositions begins:
     1: (1)
     6: (1,2)
     7: (1,1,1)
    20: (2,3)
    21: (2,2,1)
    26: (1,2,2)
    27: (1,2,1,1)
    30: (1,1,1,2)
    31: (1,1,1,1,1)
    72: (3,4)
    73: (3,3,1)
    82: (2,3,2)
    83: (2,3,1,1)
    86: (2,2,1,2)
    87: (2,2,1,1,1)
		

Crossrefs

These compositions are counted by A000984 (bisection of A126869).
The version for Heinz numbers of partitions is A001105.
A version using runs of binary digits is A066879.
These are positions of 1's in A344618.
The non-reverse version is A345909.
The opposite (negative 1) version is A345912.
The version for prime indices is A345958.
Standard compositions: A000120, A066099, A070939, A228351, A124754, A344618.
A000041 counts partitions of 2n with alternating sum 0, ranked by A000290.
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.
A344611 counts partitions of 2n with reverse-alternating sum >= 0.
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, 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, 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

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    sats[y_]:=Sum[(-1)^(i-Length[y])*y[[i]],{i,Length[y]}];
    Select[Range[0,100],sats[stc[#]]==1&]
Previous Showing 11-20 of 149 results. Next