%I #39 Feb 21 2019 20:51:19
%S 1,3,0,-14,13,22,0,-30,-82,101,0,-46,170,54,0,-524,31,70,0,-78,442,
%T 1236,0,-94,-3204,1785,0,-2428,842,118,0,-126,6208,4228,0,-14508,
%U 10359,150,0,-6764,-18404,166,0,-174,2026,54890,0,-190,-49282,48837,0,-14556,2810,214,0,-113612,-63172,20068,0,-238,272212,246,0,-475114,361601,249292,0,-270,4762,34964,0,-286,-901718,294,0,-536698,5930,1591220,0,-318,-2282050,1518439,0
%N G.f.: Sum_{n>=0} (x^n + i)^n / (1 + i*x^n)^(n+1), in which the constant term is taken to be 1.
%C It is remarkable that the generating function results in a power series in x with only real coefficients.
%C It appears that, apart from zeros, there are no 2 terms with the same absolute value.
%C Odd terms occur only at n = k^2 for k >= 0 (conjecture);
%C a(n^2) = A323687(n).
%H Paul D. Hanna, <a href="/A323689/b323689.txt">Table of n, a(n) for n = 0..10000</a>
%F GENERATING FUNCTIONS.
%F If the constant term in each of the following sums is taken to be 1, then each can be expanded into a power series in x given by g.f. A(x) = Sum_{n>=0} a(n)*x^n.
%F (1a) A(x) = Sum_{n>=0} (x^n + i)^n / (1 + i*x^n)^(n+1).
%F (1b) A(x) = Sum_{n>=0} (x^n - i)^n / (1 - i*x^n)^(n+1).
%F (2a) A(x) = Sum_{n>=0} i^n * (1 - i*x^n)^(2*n+1) / (1 + x^(2*n))^(n+1).
%F (2b) A(x) = Sum_{n>=0} (-i)^n * (1 + i*x^n)^(2*n+1) / (1 + x^(2*n))^(n+1).
%F FORMULAS INVOLVING TERMS.
%F a(n^2) = 1 (mod 2) for n >= 0.
%F a(4*n+2) = 0 for n >= 0.
%F a(4*n+1) > 0; a(4*n+3) < 0.
%F a(p) = (-1)^((p-1)/2) * 2*(2*p + 1) for odd primes p.
%e G.f.: A(x) = 1 + 3*x - 14*x^3 + 13*x^4 + 22*x^5 - 30*x^7 - 82*x^8 + 101*x^9 - 46*x^11 + 170*x^12 + 54*x^13 - 524*x^15 + 31*x^16 + 70*x^17 - 78*x^19 + 442*x^20 + 1236*x^21 - 94*x^23 - 3204*x^24 + 1785*x^25 - 2428*x^27 + 842*x^28 + 118*x^29 - 126*x^31 + 6208*x^32 + 4228*x^33 - 14508*x^35 + 10359*x^36 + ...
%e which equals the following sum when expanded as a power series in x:
%e A(x) = 1/(1+i) + (x+i)/(1+i*x)^2 + (x^2 + i)^2/(1 + i*x^2)^3 + (x^3 + i)^3/(1 + i*x^3)^4 + (x^4 + i)^4/(1 + i*x^4)^5 + (x^5 + i)^5/(1 + i*x^5)^6 + (x^6 + i)^6/(1 + i*x^6)^7 + (x^7 + i)^7/(1 + i*x^7)^8 + (x^8 + i)^8/(1 + i*x^8)^9 + ...
%e where the coefficient of x^0 is taken to be 1.
%e Also,
%e A(x) = (1-i)/2 + i*(1-i*x)^3/(1+x^2)^2 - (1-i*x^2)^5/(1+x^4)^3 - i*(1-i*x^3)^7/(1+x^6)^4 + (1-i*x^4)^9/(1+x^8)^5 + i*(1-i*x^5)^11/(1+x^10)^6 - (1-i*x^6)^13/(1+x^12)^7 - i*(1-i*x^7)^15/(1+x^14)^8 + (1-i*x^8)^17/(1+x^16)^9 + ...
%e where the coefficient of x^0 is taken to be 1.
%e The limit of the following sum expands into a power series in x with only real coefficients after the initial coefficient of x^0:
%e S(N) = Sum_{n=0..N} (x^n + i)^n / (1 + i*x^n)^(n+1) = i^N/(1+i) + 3*x - 14*x^3 + 13*x^4 + 22*x^5 - 30*x^7 - 82*x^8 + 101*x^9 - 46*x^11 + 170*x^12 + ...
%e here, we ignore the coefficient of x^0 and set a(0) = 1.
%e TRIANGLE FORM.
%e This sequence may be written as a triangle that begins
%e 1;
%e 3, 0, -14;
%e 13, 22, 0, -30, -82;
%e 101, 0, -46, 170, 54, 0, -524;
%e 31, 70, 0, -78, 442, 1236, 0, -94, -3204;
%e 1785, 0, -2428, 842, 118, 0, -126, 6208, 4228, 0, -14508;
%e 10359, 150, 0, -6764, -18404, 166, 0, -174, 2026, 54890, 0, -190, -49282;
%e 48837, 0, -14556, 2810, 214, 0, -113612, -63172, 20068, 0, -238, 272212, 246, 0, -475114;
%e 361601, 249292, 0, -270, 4762, 34964, 0, -286, -901718, 294, 0, -536698, 5930, 1591220, 0, -318, -2282050; ...
%e in which the first column consists of all the odd terms in this sequence:
%e [1, 3, 13, 101, 31, 1785, 10359, 48837, 361601, 1518439, ..., A323687(n), ...].
%e The row sums of the above triangle begin:
%e [1, -11, -77, -245, -1597, -3881, -7223, -322305, -1473277, -10528655, -69783637, -106719271, -735514933, -2763119839, -21354874657, -147540311867, ...].
%e The right border of the above triangle, a(n*(n+2)) for n >= 0, begins:
%e [1, -14, -82, -524, -3204, -14508, -49282, -475114, -2282050, -14220234, -94307848, -448597036, -2636981384, -14409203704, -75628385792, -462451586712, ...].
%e These related sequences are surprisingly regular.
%o (PARI) {a(n) = my(SUM = sum(m=0, n, (x^m + I +x*O(x^n))^m / (1 + I*x^m +x*O(x^n))^(m+1) ) ); polcoeff(1 + SUM - I^n/(1+I), n)}
%o for(n=0, 100, print1(a(n), ", "))
%o (PARI) {a(n) = my(SUM = sum(m=0, n, I^m*(1 - I*x^m +x*O(x^n))^(2*m+1) / (1 + x^(2*m) +x*O(x^n))^(m+1) ) ); polcoeff(1 + SUM - I^n/(1+I), n)}
%o for(n=0, 100, print1(a(n), ", "))
%Y Cf. A323687, A323690.
%Y Cf. A324300 (variant).
%K sign
%O 0,2
%A _Paul D. Hanna_, Feb 14 2019