OFFSET
0,4
FORMULA
G.f.: C(x) = (1 + (1+I)*x)/2 + sqrt(1 + 4*x^4)/(2*(1 - (1-I)*x)).
EXAMPLE
G.f.: C(x) = 1 + x - I*x^2 + (-1 - I)*x^3 - x^4 + (-1 + I)*x^5 + 2*I*x^6 + (2 + 2*I)*x^7 + 3*x^8 + (3 - 3*I)*x^9 - 6*I*x^10 + (-6 - 6*I)*x^11 - 10*x^12 +...
where
C(I*x)^-1 = 1 - I*x + (-1 - I)*x^2 - x^3 + (-1 + I)*x^4 + 2*I*x^5 +...
The real part of the g.f. begins:
real(C(x)) = 1 + x - x^3 - x^4 - x^5 + 2*x^7 + 3*x^8 + 3*x^9 - 6*x^11 - 10*x^12 - 10*x^13 + 20*x^15 + 35*x^16 + 35*x^17 - 70*x^19 - 126*x^20 - 126*x^21 +...
The imaginary part of the g.f. begins:
imag(C(x)) = -x^2 - x^3 + x^5 + 2*x^6 + 2*x^7 - 3*x^9 - 6*x^10 - 6*x^11 + 10*x^13 + 20*x^14 + 20*x^15 - 35*x^17 - 70*x^18 - 70*x^19 + 126*x^21 +...
MATHEMATICA
a[n_] := Module[{A = 1 + x}, For[i = 1, i <= n, i++, A = 1 + x/(A /. x -> I*x + x*O[x]^n)]; Norm[Coefficient[A, x, n]]^2]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, May 16 2017, adapted from PARI *)
PROG
(PARI) {a(n)=local(A=1+x); for(i=1, n, A=1+x/subst(A, x, I*x +x*O(x^n))); norm(polcoeff(A, n))}
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Jul 24 2011
STATUS
approved