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-3 of 3 results.

A294175 a(n) = 2^(n-1) + ((1+(-1)^n)/4)*binomial(n, n/2) - binomial(n, floor(n/2)).

Original entry on oeis.org

0, 0, 1, 1, 5, 6, 22, 29, 93, 130, 386, 562, 1586, 2380, 6476, 9949, 26333, 41226, 106762, 169766, 431910, 695860, 1744436, 2842226, 7036530, 11576916, 28354132, 47050564, 114159428, 190876696, 459312152, 773201629, 1846943453, 3128164186, 7423131482
Offset: 0

Views

Author

Enrique Navarrete, Feb 10 2018

Keywords

Comments

Number of subsets of {1,2,...,n} that contain more even than odd numbers.
Note that A058622 counts the nonempty subsets of {1,2,...,n} that contain more odd than even numbers.
From Gus Wiseman, Jul 22 2021: (Start)
Also the number of integer compositions of 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(0) = 0 through a(6) = 6 compositions (empty columns indicated by dots) are:
. . (12) (13) (14) (15)
(23) (24)
(131) (141)
(1112) (1113)
(1211) (1212)
(1311)
Also the number of integer compositions of 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 (n+1)-digit binary numbers with more 0's than 1's. For example, the a(0) = 0 through a(5) = 6 binary numbers are:
. . 100 1000 10000 100000
10001 100001
10010 100010
10100 100100
11000 101000
110000
(End)
2*a(n) is the number of all-positive pinnacle sets that are admissible in the group S_{n+1}^B of signed permutations, but not admissible in S_{n+1}. - Bridget Tenner, Jan 06 2023

Examples

			For example, for n=5, a(5)=6 and the 6 subsets are {2}, {4}, {2,4}, {1,2,4}, {2,3,4}, {2,4,5}.
		

Crossrefs

The even bisection is A000346.
The odd bisection is A008549.
The following relate to compositions of n + 1 with alternating sum k < 0.
- The k = 1 version is A000984, ranked by A345909/A345911.
- The opposite (k > 0) version is A027306, ranked by A345917/A345918.
- The weak (k <= 0) version A058622, ranked by A345915/A345916.
- The k != 0 version is also A058622, ranked by A345921.
- The complement (k >= 0) is counted by A116406, ranked by A345913/A345914.
- The k = 0 version is A138364, ranked by A344619.
- The unordered version is A344608, ranked by A119899.
- Ranked by A345919 (reverse: A345920).
A097805 counts compositions by alternating (or reverse-alternating) sum.
A101211 lists run-lengths in binary expansion (reverse: A227736).
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A345197 counts compositions by length and alternating sum.

Programs

  • Maple
    f:= gfun:-rectoproc({(8+8*n)*a(n)+(4*n+16)*a(1+n)+(-20-6*n)*a(n+2)+(-5-n)*a(n+3)+(5+n)*a(n+4), a(0) = 0, a(1) = 0, a(2) = 1, a(3) = 1}, a(n), remember):
    map(f, [$0..40]); # Robert Israel, Feb 12 2018
  • Mathematica
    f[n_] := 2^(n - 1) + ((1 + (-1)^n)/4) Binomial[n, n/2] - Binomial[n, Floor[n/2]]; Array[f, 38, 0] (* Robert G. Wilson v, Feb 10 2018 *)
    Table[Length[Select[Tuples[{0,1},{n+1}],First[#]==1&&Count[#,0]>Count[#,1]&]],{n,0,10}] (* Gus Wiseman, Jul 22 2021 *)

Formula

From Robert Israel, Feb 12 2018: (Start)
G.f.: (x+1)*sqrt(1-4*x^2)/(2*x*(4*x^2-1))+(x-1)/(2*(2*x-1)*x).
D-finite with recurrence: (8+8*n)*a(n)+(4*n+16)*a(1+n)+(-20-6*n)*a(n+2)+(-5-n)*a(n+3)+(5+n)*a(n+4) = 0. (End)

A359067 a(2*n) = Sum_{k=0..n-1} binomial(2*n,k) binomial(2*n-1-k, n-1-k). a(2*n+1) = (Sum_{k=0..n} binomial(2*n+1,k) binomial(2*n-k, n-k)) - binomial(2*n-1, n).

Original entry on oeis.org

0, 1, 4, 7, 28, 49, 199, 351, 1436, 2561, 10499, 18943, 77617, 141569, 579149, 1066495, 4354780, 8085505, 32954635, 61616127, 250713893, 471556097, 1915928117, 3621830655, 14696701553, 27902803969, 113099318869, 215530668031, 872780984131, 1668644405249, 6751457741849
Offset: 1

Views

Author

Bridget Tenner, Dec 15 2022

Keywords

Comments

For n >= 3, the number of admissible pinnacle sets in the group S_n^D of even-signed permutations.
The even-indexed terms match the even-indexed terms of A359066. The odd-indexed terms differ from the odd-indexed terms of A359066 by binomial(2*n-1, n).

Examples

			For n = 3, the a(3) = 4 admissible pinnacle sets in S_3^D are {}, {1}, {2}, {3}.
		

Crossrefs

Programs

  • Maple
    a := n -> if irem(n - 1, 2) = 1 then binomial(n, n/2 - 1)*hypergeom([n/2 + 1, -n/2 + 1], [n/2 + 2], -1) else binomial(n + 1, n/2 + 1/2)*hypergeom([n/2 + 1/2, -n/2 + 1/2], [n/2 + 3/2], -1)/2 - binomial(n - 2, n/2 - 1/2) fi:
    seq(simplify(a(n)), n = 3..31); # Peter Luschny, Jan 03 2023

Formula

a(2*n) = Sum_{k=0..n-1} binomial(2*n,k) binomial(2*n-1-k, n-1-k).
a(2*n+1) = (Sum_{k=0..n} binomial(2*n+1,k) binomial(2*n-k, n-k)) - binomial(2*n-1, n).
a(n) = A240721((n-2)/2) if n-1 is odd and otherwise A178792((n-1)/2) - binomial(2*n - 1, n). - Peter Luschny, Jan 03 2023

A363582 Number of admissible mesa sets among Stirling permutations of order n.

Original entry on oeis.org

1, 2, 3, 6, 12, 22, 44, 88, 169, 338, 676, 1322, 2644, 5288, 10433, 20866, 41732, 82736, 165472, 330944, 658012, 1316024, 2632048, 5242778, 10485556, 20971112, 41822049, 83644098, 167288196, 333885702, 667771404, 1335542808, 2667053601, 5334107202, 10668214404
Offset: 1

Views

Author

Bridget Tenner, Jun 10 2023

Keywords

Examples

			For n = 4, the a(4) = 6 admissible pinnacle sets for Stirling permutations of order 4 are {}, {2}, {3}, {4}, {2,4}, and {3,4}.
		

References

  • Nicolle González, Pamela E. Harris, Gordon Rojas Kirby, Mariana Smit Vega Garcia, and Bridget Eileen Tenner, "Mesas of Stirling permutations," preprint.

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<4, n, (2*n*(2*n-3)*
          a(n-1)+27*(n-4)*(n-2)*(a(n-3)/2-a(n-4)))/(n*(2*n-3)))
        end:
    seq(a(n), n=1..45);  # Alois P. Heinz, Jun 13 2023

Formula

Let n = 3*k+r, where r is in {0,1,2}, and let C_(x,y) be the rational Catalan numbers (A328901/A328902). Then a(n) = 2^(n-1) - Sum_{i=0..k-1} 2^(3*i+r)*C_(2*(k-i)-1,k-i).

Extensions

More terms from Alois P. Heinz, Jun 13 2023
Showing 1-3 of 3 results.