A344560
a(n) = hypergeom([-n/3, (1 - n)/3, (2 - n)/3], [1, 1], -27).
Original entry on oeis.org
1, 1, 1, 7, 25, 61, 211, 841, 2857, 9745, 36421, 134971, 488731, 1807807, 6788965, 25384087, 95114377, 359291737, 1361265889, 5162682775, 19642369405, 74960720065, 286563664135, 1097430871285, 4211301910795, 16187715501811, 62311953400711, 240203420513161
Offset: 0
-
a := n -> hypergeom([-n/3, (1 - n)/3, (2 - n)/3], [1, 1], -27):
seq(simplify(a(n)), n = 0..27);
a := proc(n) option remember; if n < 4 then [1, 1, 1, 7][n+1] else
((28*n^2 - 84*n + 56)*a(n - 3) - 3*(n - 1)^2*a(n - 2) + (3*n^2 - 3*n + 1)*a(n - 1))/ n^2 fi end: seq(a(n), n = 0..27);
-
Table[HypergeometricPFQ[{-n/3, (1 - n)/3, (2 - n)/3}, {1, 1}, -27], {n, 0, 27}] (* Amiram Eldar, Jun 22 2021 *)
-
a(n)=sum(k=0, n\3, n!/(k!^3*(n-3*k)!)) \\ Andrew Howroyd, Jan 14 2023
-
from sympy import hyperexpand, Rational
from sympy.functions import hyper
def A344560(n): return hyperexpand(hyper((Rational(-n,3),Rational(1-n,3),Rational(2-n,3)),(1,1),-27)) # Chai Wah Wu, Jan 04 2024
A097861
Number of humps in all Motzkin paths of length n. (A hump is an upstep followed by 0 or more flatsteps followed by a downstep.)
Original entry on oeis.org
0, 0, 1, 3, 9, 25, 70, 196, 553, 1569, 4476, 12826, 36894, 106470, 308113, 893803, 2598313, 7567465, 22076404, 64498426, 188689684, 552675364, 1620567763, 4756614061, 13974168190, 41088418150, 120906613075, 356035078101, 1049120176953, 3093337815409
Offset: 0
a(3) = 3 because in all Motzkin paths of length 3 we have 3 humps, shown between parentheses: FFF, F(UD), (UD)F, (UFD) (here U = (1,1), F = (1,0), D = (1,-1)).
a(5) = (10 + 15) = 25 combinations of two equal size distinct subsets, i.e. given 5 items, there are 10 distinct pairs of size 1: "1|2, 1|3, 1|4, 1|5, and 2|3, 2|4, 2|5, and 3|4, 3|5, 4|5". Plus 15 distinct pairs of size 2: "12|34, 12|35, 12|45, and 13|24, 13|25, 13|45, and 14|23, 14|25, 14|35, and 15|23, 15|24, 15|34, and 23|45, 24|35, 25|34". - _Viktar Karatchenia_, Sep 09 2015
- Robert Israel, Table of n, a(n) for n = 0..1892
- Jean-Luc Baril, Richard Genestier, and Sergey Kirgizov, Pattern distributions in Dyck paths with a first return decomposition constrained by height, arXiv:1911.03119 [math.CO], 2019.
- Y. Din and R. R. X. Du, Counting Humps in Motzkin paths, arXiv:1109.2661 (2011) Eq. (2.2).
- László Németh, The trinomial transform triangle, J. Int. Seqs., Vol. 21 (2018), Article 18.7.3. Also arXiv:1807.07109 [math.NT], 2018.
-
I := [0,0,1,3]; [n le 4 select I[n] else ((3*n^2-7*n+3)*Self(n-1)+(n-1)*(n-3)*Self(n-2)-3*(n-1)*(n-2)*Self(n-3)) div (n*(n-2)): n in [1..30]]; // Vincenzo Librandi, Sep 14 2015
-
G := (1-z-sqrt(1-2*z-3*z^2))/2/(1-z)/sqrt(1-2*z-3*z^2):
Gser := series(G, z=0, 33): seq(coeff(Gser, z^n), n = 0..32);
# Alternative:
a := n -> add(binomial(n,j)*binomial(n-j,j)/2, j=1..n):
seq(a(n), n = 0..27); # Zerinvary Lajos, Sep 24 2006
# Third program:
Exp := (x, m) -> sum((x^k / k!)^m, k = 0..infinity):
egf := Exp(2*x, 1)*(Exp(2*x, 2) - 1): ser := series(egf, x, 32):
seq((1/2)*2^(-n)*n!*simplify(coeff(ser, x, n)), n = 0..29); # Peter Luschny, Jun 01 2021
-
CoefficientList[Series[(1 - z - Sqrt[1 - 2 z - 3 z^2])/(2 (1 - z) Sqrt[1 - 2 z - 3 z^2]), {z, 0, 33}], z] (* Vincenzo Librandi, Sep 14 2015 *)
a[n_] := (1/2)*(HypergeometricPFQ[{1/2 - n/2, -n/2}, {1}, 4] - 1);
Table[a[n], {n, 0, 29}] (* Peter Luschny, Jun 01 2021 *)
-
from sympy import hyperexpand, S
from sympy.functions import hyper
def A097861(n): return hyperexpand(hyper(((1-n)*S.Half,-n*S.Half),(1,),4))-1>>1 # Chai Wah Wu, Jan 04 2024
A346906
Triangle read by rows: T(n,k) is the number of ways of choosing a k-dimensional cube from the vertices of an n-dimensional hypercube, where one of the vertices is the origin; 0 <= k <= n.
Original entry on oeis.org
1, 1, 1, 1, 3, 1, 1, 7, 3, 1, 1, 15, 9, 4, 1, 1, 31, 25, 10, 5, 1, 1, 63, 70, 35, 15, 6, 1, 1, 127, 196, 140, 35, 21, 7, 1, 1, 255, 553, 476, 175, 56, 28, 8, 1, 1, 511, 1569, 1624, 1071, 126, 84, 36, 9, 1, 1, 1023, 4476, 6070, 4935, 1197, 210, 120, 45, 10, 1
Offset: 0
Triangle begins:
n\k | 0 1 2 3 4 5 6 7 8 9
----+--------------------------------------------------
0 | 1;
1 | 1, 1;
2 | 1, 3, 1;
3 | 1, 7, 3, 1;
4 | 1, 15, 9, 4, 1;
5 | 1, 31, 25, 10, 5, 1;
6 | 1, 63, 70, 35, 15, 6, 1;
7 | 1, 127, 196, 140, 35, 21, 7, 1;
8 | 1, 255, 553, 476, 175, 56, 28, 8, 1;
9 | 1, 511, 1569, 1624, 1071, 126, 84, 36, 9, 1
One of the T(7,3) = 140 ways of choosing a 3-cube from the vertices of a 7-cube where one of the vertices is the origin is the cube with the following eight points:
(0,0,0,0,0,0,0);
(1,1,0,0,0,0,0);
(0,0,1,0,0,1,0);
(0,0,0,0,1,0,1);
(1,1,1,0,0,1,0);
(1,1,0,0,1,0,1);
(0,0,1,0,1,1,1); and
(1,1,1,0,1,1,1).
-
T[n_, 0] := 1
T[n_, k_] := Sum[n!/(k!*(i!)^k*(n - i*k)!), {i, 1, n/k}]
Showing 1-3 of 3 results.
Comments