OFFSET
0,3
COMMENTS
Note that the generating function expands into a power series in x with only real coefficients.
LINKS
Paul D. Hanna, Table of n, a(n) for n = 0..300
FORMULA
G.f.: Sum_{n>=0} x^n * ((1+x)^n + 2*i)^n / (1 + 2*i*x*(1+x)^n)^(n+1).
G.f.: Sum_{n>=0} x^n * ((1+x)^n - 2*i)^n / (1 - 2*i*x*(1+x)^n)^(n+1).
EXAMPLE
G.f.: A(x) = 1 + x + 2*x^2 + 13*x^3 + 40*x^4 + 177*x^5 + 959*x^6 + 4927*x^7 + 28118*x^8 + 173747*x^9 + 1116769*x^10 + 7572422*x^11 + ...
Let r = 2*i, so that r^2 = -4, then
A(x) = 1/(1 + r*x) + x*((1+x) + r)/(1 + r*x*(1+x))^2 + x^2*((1+x)^2 + r)^2/(1 + r*x*(1+x)^2)^3 + x^3*((1+x)^3 + r)^3/(1 + r*x*(1+x)^3)^4 + x^4*((1+x)^4 + r)^4/(1 + r*x*(1+x)^4)^5 + x^5*((1+x)^5 + r)^5/(1 + r*x*(1+x)^5)^6 + ...
also,
A(x) = 1/(1 - r*x) + x*((1+x) - r)/(1 - r*x*(1+x))^2 + x^2*((1+x)^2 - r)^2/(1 - r*x*(1+x)^2)^3 + x^3*((1+x)^3 - r)^3/(1 - r*x*(1+x)^3)^4 + x^4*((1+x)^4 - r)^4/(1 - r*x*(1+x)^4)^5 + x^5*((1+x)^5 - r)^5/(1 - r*x*(1+x)^5)^6 + ...
PROG
(PARI) {a(n) = my(r = 2*I, A = sum(m=0, n+1, x^m*((1+x +x*O(x^n))^m + r)^m/(1 + r*x*(1+x +x*O(x^n))^m)^(m+1) )); polcoeff(A, n)}
for(n=0, 30, print1(a(n), ", "))
(PARI) {a(n) = my(r = 2*I, A = sum(m=0, n+1, x^m*((1+x +x*O(x^n))^m - r)^m/(1 - r*x*(1+x +x*O(x^n))^m)^(m+1) )); polcoeff(A, n)}
for(n=0, 30, print1(a(n), ", "))
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Feb 12 2019
STATUS
approved