cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A218137 Sum of absolute values of real and imaginary parts of the coefficients in the expansion of 1 / (1 - x - I*x^2), where I^2=-1.

Original entry on oeis.org

1, 1, 2, 3, 3, 6, 9, 11, 16, 27, 37, 40, 77, 117, 144, 207, 351, 482, 523, 999, 1522, 1879, 2681, 4560, 6279, 6839, 12960, 19799, 24517, 34722, 59239, 81793, 89424, 168123, 257547, 319880, 449667, 769547, 1065430, 1169193, 2180881, 3350074, 4173363, 5823117, 9996480
Offset: 0

Views

Author

Paul D. Hanna, Oct 21 2012

Keywords

Examples

			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, ...
		

Crossrefs

Programs

  • 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),", "))