(PARI) \\ using formula (1)
{a(n) = my(V=[0, 1]); for(i=1, n, V=concat(V, 0); A=Ser(V);
V[#V] = polcoef(x - sum(m=1, #V, subst(A, x, x^m*(1 - 2*x) +x*O(x^#V))), #V-1) ); polcoef(A, n)}
for(n=1, 30, print1(a(n), ", "))
(PARI) \\ using formula (2)
{a(n) = my(V=[0, 1]); for(i=1, n, V=concat(V, 0); A=Ser(V);
V[#V] = polcoef(x - sum(m=1, #V-1, V[m+1]*x^m*(1-2*x)^m/(1-x^m +O(x^#V))), #V-1) ); polcoef(A, n)}
for(n=1, 30, print1(a(n), ", "))