OFFSET
0,3
LINKS
Paul D. Hanna, Table of n, a(n) for n = 0..1000
EXAMPLE
G.f.: A(x) = 1 + x + 2*x^2 + 3*x^3 + 3*x^4 + 6*x^5 + 9*x^6 + 11*x^7 + 16*x^8 +...
The terms equal the sum of absolute values of real and imaginary parts of the coefficients in the expansion:
1/(1-x-I*x^2) = 1 + x + (1 + I)*x^2 + (1 + 2*I)*x^3 + 3*I*x^4 + (-2 + 4*I)*x^5 + (-5 + 4*I)*x^6 + (-9 + 2*I)*x^7 + (-13 - 3*I)*x^8 + (-15 - 12*I)*x^9 + (-12 - 25*I)*x^10 - 40*I*x^11 + (25 - 52*I)*x^12 + (65 - 52*I)*x^13 + (117 - 27*I)*x^14 + (169 + 38*I)*x^15 + (196 + 155*I)*x^16 + (158 + 324*I)*x^17 + (3 + 520*I)*x^18 + (-321 + 678*I)*x^19 + (-841 + 681*I)*x^20 +...
so that
a(1) = 1, a(2) = 1 + 1, a(3) = 1 + 2, a(4) = 3, a(5) = 2 + 4, ...
PROG
(PARI) {a(n)=local(Cn=polcoeff(1/(1-x-I*x^2+x*O(x^n)), n)); abs(real(Cn)) + abs(imag(Cn))}
for(n=0, 40, print1(a(n), ", "))
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Oct 21 2012
STATUS
approved