login
G.f. A(x) satisfies: A(x) = 1 + x^2 + x^3 * A(x/(1 - x)) / (1 - x).
3

%I #12 Nov 30 2022 08:25:02

%S 1,0,1,1,1,2,5,12,28,68,181,531,1671,5491,18627,65299,237880,903907,

%T 3580619,14729777,62639952,274442521,1236730244,5729809348,

%U 27292248240,133614280479,671803041553,3464970976743,18309428363425,99010800275743,547462187824465,3093329527120022

%N G.f. A(x) satisfies: A(x) = 1 + x^2 + x^3 * A(x/(1 - x)) / (1 - x).

%H G. C. Greubel, <a href="/A346051/b346051.txt">Table of n, a(n) for n = 0..695</a>

%F a(0) = 1, a(1) = 0, a(2) = 1; a(n) = Sum_{k=0..n-3} binomial(n-3,k) * a(k).

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

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

%o (Magma)

%o function a(n)

%o if n lt 3 then return (1+(-1)^n)/2;

%o else return (&+[Binomial(n-3,j)*a(j): j in [0..n-3]]);

%o end if; return a;

%o end function;

%o [a(n): n in [0..35]]; // _G. C. Greubel_, Nov 30 2022

%o (SageMath)

%o @CachedFunction

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

%o if (n<3): return (1, 0, 1)[n]

%o else: return sum(binomial(n-3, k)*a(k) for k in range(n-2))

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

%Y Cf. A000994, A000995, A000996, A000997, A000998.

%Y Cf. A007476, A210540, A346050, A346052.

%K nonn

%O 0,6

%A _Ilya Gutkovskiy_, Jul 02 2021