login
a(0) = ... = a(4) = 1; a(n) = Sum_{k=1..n-5} a(k) * a(n-k-5).
4

%I #9 Nov 28 2022 01:45:37

%S 1,1,1,1,1,0,1,2,3,4,4,4,6,10,16,24,30,37,50,74,116,175,245,332,456,

%T 654,981,1471,2146,3056,4320,6203,9119,13540,19986,29134,42113,61047,

%U 89398,132021,195272,287547,421235,616418,905161,1335648,1976407,2922982,4313230

%N a(0) = ... = a(4) = 1; a(n) = Sum_{k=1..n-5} a(k) * a(n-k-5).

%H G. C. Greubel, <a href="/A346049/b346049.txt">Table of n, a(n) for n = 0..1000</a>

%F G.f. A(x) satisfies: A(x) = 1 + x + x^2 + x^3 + x^4 + x^5 * A(x) * (A(x) - 1).

%t a[0] = a[1] = a[2] = a[3] = a[4] = 1; a[n_] := a[n] = Sum[a[k] a[n - k - 5], {k, 1, n - 5}]; Table[a[n], {n, 0, 48}]

%t nmax = 48; A[_] = 0; Do[A[x_] = 1 + x + x^2 + x^3 + x^4 + x^5 A[x] (A[x] - 1) + O[x]^(nmax + 1) // Normal, nmax + 1]; CoefficientList[A[x], x]

%o (SageMath)

%o @CachedFunction

%o def a(n): # a = A346049

%o if (n<5): return 1

%o else: return sum(a(k)*a(n-k-5) for k in range(1,n-4))

%o [a(n) for n in range(51)] # _G. C. Greubel_, Nov 28 2022

%Y Cf. A025250, A307972, A343305, A346047, A346048.

%K nonn

%O 0,8

%A _Ilya Gutkovskiy_, Jul 02 2021