OFFSET
0,5
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
FORMULA
G.f. A(x) satisfies: A(x) = 1 / (1 - x) + x^4 * A(x)^2.
a(n) = Sum_{k=0..floor(n/4)} binomial(n-3*k,k) * Catalan(k). - Seiichi Manyama, Jan 22 2023
MATHEMATICA
a[n_] := a[n] = 1 + Sum[a[k] a[n - k - 4], {k, 0, n - 4}]; Table[a[n], {n, 0, 42}]
nmax = 42; A[_] = 0; Do[A[x_] = 1/(1 - x) + x^4 A[x]^2 + O[x]^(nmax + 1) // Normal, nmax + 1]; CoefficientList[A[x], x]
PROG
(SageMath)
@CachedFunction
def a(n): # a = A346073
if (n<4): return 1
else: return 1 + sum(a(k)*a(n-k-4) for k in range(n-3))
[a(n) for n in range(51)] # G. C. Greubel, Nov 26 2022
(PARI) a(n) = sum(k=0, n\4, binomial(n-3*k, k)*binomial(2*k, k)/(k+1)); \\ Seiichi Manyama, Jan 22 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Jul 04 2021
STATUS
approved