login
A346052
G.f. A(x) satisfies: A(x) = 1 + x + x^3 * A(x/(1 - x)) / (1 - x).
3
1, 1, 0, 1, 2, 3, 5, 11, 29, 80, 222, 630, 1881, 6004, 20420, 72979, 270659, 1035590, 4087205, 16675630, 70440641, 307933393, 1390117953, 6462787357, 30871458702, 151298796000, 760250325004, 3915477534861, 20662363081756, 111662169790416, 617482470676567, 3490973387652861
OFFSET
0,5
LINKS
FORMULA
a(0) = a(1) = 1, a(2) = 0; a(n) = Sum_{k=0..n-3} binomial(n-3,k) * a(k).
MATHEMATICA
nmax = 31; A[_] = 0; Do[A[x_] = 1 + x + x^3 A[x/(1 - x)]/(1 - x) + O[x]^(nmax + 1) // Normal, nmax + 1]; CoefficientList[A[x], x]
a[0] = a[1] = 1; a[2] = 0; a[n_] := a[n] = Sum[Binomial[n - 3, k] a[k], {k, 0, n - 3}]; Table[a[n], {n, 0, 31}]
PROG
(Magma)
function a(n) // a = A346052
if n lt 3 then return Floor((3-n)/2);
else return (&+[Binomial(n-3, j)*a(j): j in [0..n-3]]);
end if; return a;
end function;
[a(n): n in [0..35]]; // G. C. Greubel, Nov 30 2022
(SageMath)
@CachedFunction
def a(n): # a = A346052
if (n<3): return (1, 1, 0)[n]
else: return sum(binomial(n-3, k)*a(k) for k in range(n-2))
[a(n) for n in range(51)] # G. C. Greubel, Nov 30 2022
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Jul 02 2021
STATUS
approved