A156275
a(n) = 10^n*Catalan(n).
Original entry on oeis.org
1, 10, 200, 5000, 140000, 4200000, 132000000, 4290000000, 143000000000, 4862000000000, 167960000000000, 5878600000000000, 208012000000000000, 7429000000000000000, 267444000000000000000, 9694845000000000000000, 353576700000000000000000
Offset: 0
A354735
a(0) = a(1) = 1; a(n) = 4 * Sum_{k=0..n-2} a(k) * a(n-k-2).
Original entry on oeis.org
1, 1, 4, 8, 36, 96, 416, 1312, 5504, 19200, 79168, 293888, 1203712, 4648448, 19027968, 75411456, 309487616, 1248411648, 5144133632, 21011775488, 86971449344, 358540509184, 1490753372160, 6189315784704, 25843660619776, 107902536122368, 452308820819968, 1897178275512320
Offset: 0
-
a[0] = a[1] = 1; a[n_] := a[n] = 4 Sum[a[k] a[n - k - 2], {k, 0, n - 2}]; Table[a[n], {n, 0, 27}]
nmax = 27; CoefficientList[Series[(1 - Sqrt[1 - 16 x^2 (1 + x)])/(8 x^2), {x, 0, nmax}], x]
A240558
a(n) = 2^n*n!/((floor(n/2)+1)*floor(n/2)!^2).
Original entry on oeis.org
1, 2, 4, 24, 32, 320, 320, 4480, 3584, 64512, 43008, 946176, 540672, 14057472, 7028736, 210862080, 93716480, 3186360320, 1274544128, 48432676864, 17611882496, 739699064832, 246566354944, 11342052327424, 3489862254592, 174493112729600, 49855175065600
Offset: 0
-
A240558 := n -> 2^n*n!/((iquo(n,2)+1)*iquo(n,2)!^2):
seq(A240558(n), n=0..30);
-
Table[SeriesCoefficient[((I*(2*x*(8*x+1)-1))/Sqrt[16*x^2-1]-2*x+1) /(8*x^2), {x,0,n}], {n,0,22}]
-
x='x+O('x^50); Vec(round((I*(2*x*(8*x+1)-1))/sqrt(16*x^2-1)-2*x+1) /(8*x^2)) \\ G. C. Greubel, Apr 05 2017
-
def A240558():
x, n = 1, 1
while True:
yield x
m = 2*n if is_odd(n) else 8/(n+2)
x *= m
n += 1
a = A240558(); [next(a) for i in range(36)]
A375393
a(0) = 1; a(n) = Sum_{k=0..n-1} (4*k+3) * a(k) * a(n-k-1).
Original entry on oeis.org
1, 3, 30, 483, 10314, 268686, 8167068, 281975715, 10863651474, 461227101210, 21377716429860, 1073816307452430, 58106804389870500, 3370330005649001532, 208635817503306332088, 13731856676157543219747, 957698874584753026878306, 70562301536089812703526370, 5477354759932929856218644820
Offset: 0
-
a[0] = 1; a[n_] := a[n] = Sum[(4 k + 3) a[k] a[n - k - 1], {k, 0, n - 1}]; Table[a[n], {n, 0, 18}]
nmax = 18; A[] = 0; Do[A[x] = 1 + 3 x A[x]^2 + 4 x^2 A'[x] A[x] + O[x]^(nmax + 1) // Normal, nmax + 1]; CoefficientList[A[x], x]
A376087
a(0) = 1; a(n) = Sum_{k=0..n-1} (4*k+1) * a(k) * a(n-k-1).
Original entry on oeis.org
1, 1, 6, 65, 994, 19386, 456940, 12594465, 396969930, 14078044862, 554782989908, 24053551260186, 1138039204281236, 58353983394380500, 3223791843357228120, 190914111715994215905, 12065701995815379444954, 810602692757305194731094, 57688894099612173692496580
Offset: 0
-
a[0] = 1; a[n_] := a[n] = Sum[(4 k + 1) a[k] a[n - k - 1], {k, 0, n - 1}]; Table[a[n], {n, 0, 18}]
nmax = 18; A[] = 0; Do[A[x] = 1 + x A[x]^2 + 4 x^2 A'[x] A[x] + O[x]^(nmax + 1) // Normal, nmax + 1]; CoefficientList[A[x], x]
A178657
Irregular triangle: the coefficient [x^k] of the polynomial (1-x)^(2*n-1) * Sum_{s>=0} A001263(n+2*s,2*s+1)*x^s in row n >= 1 and column k >= 0.
Original entry on oeis.org
1, 1, 3, 1, 15, 15, 1, 1, 43, 161, 105, 10, 1, 96, 855, 1680, 855, 96, 1, 1, 185, 3191, 13387, 17655, 7623, 945, 21, 1, 323, 9570, 72254, 188188, 188188, 72254, 9570, 323, 1, 1, 525, 24675, 302359, 1345605, 2499861, 2036125, 715725, 99414, 4410, 36, 1, 808
Offset: 1
1;
1, 3;
1, 15, 15, 1;
1, 43, 161, 105, 10;
1, 96, 855, 1680, 855, 96, 1;
1, 185, 3191, 13387, 17655, 7623, 945, 21;
1, 323, 9570, 72254, 188188, 188188, 72254, 9570, 323, 1;
1, 525, 24675, 302359, 1345605, 2499861, 2036125, 715725, 99414, 4410, 36;
1, 808, 56896, 1055320, 7329975, 22338816, 32152848, 22338816, 7329975, 1055320, 56896, 808, 1;
-
A001263 := proc(n,k) if n <=0 or k <=0 then 0 ; elif k > n then 0 ; else binomial(n-1,k-1)*binomial(n,k-1)/k ; end if; end proc:
A178657 := proc(n,k) (1-x)^(2*n-1)*add(A001263(n+2*l,2*l+1)*x^l,l=0..20) ; expand(%) ; coeftayl(%,x=0,k) ; end proc: # R. J. Mathar, Aug 30 2011
-
p[x_, n_] = (1 - x)^(2*n - 1)*Sum[(Binomial[2*k + n, 2*k] Binomial[ 2*k + n, 1 + 2*k]/(2*k + n))*x^k, {k, 0, Infinity}];
Table[CoefficientList[FullSimplify[ExpandAll[p[x, n]]], x], {n, 2, 10}];
Flatten[%]
A212694
Number of 2-colored Dyck n-paths with up steps (U, u), down steps (D, d), and avoiding UU and DD.
Original entry on oeis.org
1, 4, 25, 197, 1745, 16580, 165115, 1700809, 17971466, 193710087, 2121585340, 23543198588, 264138223362, 2991130956918, 34143543312267, 392458689992396, 4538574332686469, 52768896995910303, 616471818881678085, 7232838546289017796, 85188401983572928395
Offset: 0
a(1) = 4: ud, Ud, uD, UD.
a(2) = 25: uudd, Uudd, uUdd, uuDd, UuDd, uUDd, udud, Udud, uDud, UDud, udUd, UdUd, uDUd, UDUd, uudD, UudD, uUdD, uduD, UduD, uDuD, UDuD, udUD, UdUD, uDUD, UDUD.
-
b:= proc(x, y, t) option remember; `if`(x=0, 1,
`if`(y<1 , 0, b(x-1, y-1, 0)+`if`(t=1, 0, b(x-1, y-1, 1)))+
`if`(x b(2*n, 0$2):
seq(a(n), n=0..30);
-
b[x_, y_, t_] := b[x, y, t] = If[x == 0, 1, If[y < 1, 0, b[x - 1, y - 1, 0] + If[t == 1, 0, b[x - 1, y - 1, 1]]] + If[x < y + 2, 0, b[x - 1, y + 1, 0] + If[t == 2, 0, b[x - 1, y + 1, 2]]]];
a[n_] := b[2n, 0, 0];
Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Jun 02 2018, from Maple *)
A380119
Triangle read by rows: T(n, k) is the number of walks of length 2*n on the N X N grid with unit steps in all four directions (NSWE) starting at (0, 0). k is the common value of the x- and the y-coordinate of the endpoint of the walk.
Original entry on oeis.org
1, 2, 2, 10, 16, 6, 70, 140, 90, 20, 588, 1344, 1134, 448, 70, 5544, 13860, 13860, 7392, 2100, 252, 56628, 151008, 169884, 109824, 42900, 9504, 924, 613470, 1717716, 2108106, 1561560, 750750, 231660, 42042, 3432, 6952660, 20225920, 26546520, 21781760, 12155000, 4667520, 1191190, 183040, 12870
Offset: 0
The triangle starts:
[0] [ 1]
[1] [ 2, 2]
[2] [ 10, 16, 6]
[3] [ 70, 140, 90, 20]
[4] [ 588, 1344, 1134, 448, 70]
[5] [ 5544, 13860, 13860, 7392, 2100, 252]
[6] [ 56628, 151008, 169884, 109824, 42900, 9504, 924]
[7] [ 613470, 1717716, 2108106, 1561560, 750750, 231660, 42042, 3432]
[8] [6952660, 20225920, 26546520, 21781760, 12155000, 4667520, 1191190, 183040, 12870]
.
For n = 2 the walks depending on the x-coordinate of the endpoint are:
W(x=0) = {NNSS,NSNS,NSWE,NWSE,NWES,WNSE,WNES,WWEE,WENS,WEWE},
W(x=1) = {NNSW,NNWS,NSNW,NSWN,NWNS,NWSN,NWWE,NWEW,WNNS,WNSN,WNWE,WNEW,WWNE,WWEN,WENW,WEWN},
W(x=2) = {NNWW,NWNW,NWWN,WNNW,WNWN,WWNN}.
-
from dataclasses import dataclass
@dataclass
class Walk: s: str = ""; x: int = 0; y: int = 0
def Trow(n: int) -> list[int]:
W = [Walk()]
row = [0] * (n + 1)
for w in W:
if len(w.s) == 2*n:
if w.x == w.y: row[w.y] += 1
else:
for s in "NSWE":
x = y = 0
match s:
case "W": x = 1
case "E": x = -1
case "N": y = 1
case "S": y = -1
case _ : pass
if (w.y + y >= 0) and (w.x + x >= 0):
W.append(Walk(w.s + s, w.x + x, w.y + y))
return row
for n in range(6): print(Trow(n))
A243312
The total T(d,n) of expressions with n instances of a digit d between 6 and 9 (and using the four arithmetic operators) which have a defined value when evaluated.
Original entry on oeis.org
1, 4, 31, 305, 3345, 39505, 487935, 6245118
Offset: 1
For n = 2 and digit d != 0, there are four possible expressions:
(d + d)
(d - d)
(d * d)
(d / d)
None of these include a "division by zero" operation, and so all four of the above expressions can be considered valid. Therefore, T(d, 2) = 4 for d > 0.
-
# coding=utf-8
import itertools
def all_expressions(generic_expression, operation_combinations):
"""
Merges a source expression and combinations of binary operators to generate a list of all possible expressions.
@param ((str,)) operation_combinations: all combinations of binary operators to consider
@param str generic_expression: source expression with placeholder binary operators
@rtype: (str,)
"""
expression_combinations = []
for combination in operation_combinations:
expression_combinations.append(generic_expression.format(*combination))
return expression_combinations
def all_bracketings(expr):
"""
Generates all possible permutations of parentheses for an expression.
@param str expr: the non-bracketed source expression
@rtype: str
"""
if len(expr) == 1:
yield expr
else:
for i in range(1, len(expr), 2):
for left_expr in all_bracketings(expr[:i]):
for right_expr in all_bracketings(expr[i + 1:]):
yield "({}{}{})".format(left_expr, expr[i], right_expr)
def num_valid_expressions(num_digits):
"""Perform all calculations with the given operations and in the range of digits specified.
@param int num_digits: the number of digits in the expression
@rtype: int
"""
operations = ["+", "-", "*", "/"]
digit = 9
operation_iterable = itertools.product(*[operations] * (num_digits - 1))
operation_combinations = []
valid_expression_count = 0
template = " ".join(str(digit) * num_digits)
for operation in operation_iterable:
operation_combinations.append(operation)
for bracketed_expression in all_bracketings(template):
for expression in all_expressions(bracketed_expression.replace(" ", "{}"), operation_combinations):
try:
eval(expression)
valid_expression_count += 1
except ZeroDivisionError:
pass
return valid_expression_count
if _name_ == "_main_":
min_num_digits = 1
max_num_digits = 6
operation_set = ["+", "-", "*", "/"]
for num in range(min_num_digits, max_num_digits + 1):
print(num_valid_expressions(num))
A338415
Triangle read by rows: T(n,m) = C(n+m+1,n)*C(2*n-m,n)*C(3*n+1,n)*C(4*n+2,2*m+1)/(2*(n+1)*C(2*n,n)*C(2*n+2*m+2,2*n)).
Original entry on oeis.org
1, 2, 2, 7, 18, 7, 30, 130, 130, 30, 143, 884, 1530, 884, 143, 728, 5880, 14896, 14896, 5880, 728, 3876, 38760, 131100, 193200, 131100, 38760, 3876, 21318, 254562, 1085238, 2153250, 2153250, 1085238, 254562, 21318, 120175, 1669800, 8627300, 21755800, 29370330, 21755800, 8627300, 1669800, 120175
Offset: 0
1,
2, 2,
7, 18, 7,
30, 130, 130, 30,
143, 884, 1530, 884, 143
-
A(x,y) := ((x*(27*y^4-108*y^3+162*y^2+(-108)*y+27)-2*y^3+66*y^2+66*y-2)/(54*y^6-324*y^5+810*y^4+(-1080)*y^3+810*y^2+(-324)*y+54)+sqrt(27*x^2*y^4+((-108)*x^2-4*x)*y^3+(162*x^2+132*x)*y^2+((-108)*x^2+132*x-16)*y+27*x^2+(-4)*x)/(2*3^(3/2)*(y-1)^4))^(1/3)+(y^2+14*y+1)/((9*y^4-36*y^3+54*y^2+(-36)*y+9)*((x*(27*y^4-108*y^3+162*y^2+(-108)*y+27)-2*y^3+66*y^2+66*y-2)/(54*y^6-324*y^5+810*y^4+(-1080)*y^3+810*y^2+(-324)*y+54)+sqrt(27*x^2*y^4+((-108)*x^2-4*x)*y^3+(162*x^2+132*x)*y^2+((-108)*x^2+132*x-16)*y+27*x^2+(-4)*x)/(2*3^(3/2)*(y-1)^4))^(1/3))+(2*y+2)/(3*(y^2-2*y+1));
taylor(A(x,y),x,0,7,y,0,7);
-
T(n,m):=(binomial(n+m+1,n)*binomial(2*n-m,n)*binomial(3*n+1,n)* binomial(4*n+2,2*m+1))/((2*n+2)*binomial(2*n,n)*binomial(2*n+2*m+2,2*n));
Comments