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.

A236377 Real part of Sum_{k=0..n} (k + i^k)^2, where i=sqrt(-1).

Original entry on oeis.org

1, 1, 2, 10, 35, 59, 84, 132, 213, 293, 374, 494, 663, 831, 1000, 1224, 1513, 1801, 2090, 2450, 2891, 3331, 3772, 4300, 4925, 5549, 6174, 6902, 7743, 8583, 9424, 10384, 11473, 12561, 13650, 14874, 16243, 17611, 18980, 20500, 22181, 23861, 25542, 27390
Offset: 0

Views

Author

Bruno Berselli, Jan 24 2014

Keywords

Comments

Corresponding imaginary parts: -i^(n*(n+1))*A052928(n+1).

Examples

			For n=6, sum_(k=0)^6 (k + i^k)^2 = 84 + 6*i, therefore a(6) = 84.
		

Crossrefs

Cf. A058373: real part of Sum_{k=0..n} (k + i)^2.

Programs

  • Magma
    m:=50; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((1-2*x+3*x^2+4*x^3+11*x^4-10*x^5+9*x^6)/((1+x)*(1+x^2)^2*(1-x)^4)));
  • Mathematica
    LinearRecurrence[{3, -4, 4, -2, -2, 4, -4, 3, -1}, {1, 1, 2, 10, 35, 59, 84, 132, 213}, 50]

Formula

G.f.: (1 - 2*x + 3*x^2 + 4*x^3 + 11*x^4 - 10*x^5 + 9*x^6)/((1 + x)*(1 + x^2)^2*(1 - x)^4).
a(n) = 3*a(n-1) -4*a(n-2) +4*a(n-3) -2*a(n-4) -2*a(n-5) +4*a(n-6) -4*a(n-7) +3*a(n-8) -a(n-9).
a(n) = A000330(n) + A127630(n) - A000035(n).