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.

A319438 a(n) = 1^2 - 3^4 + 5^6 - 7^8 + 9^10 - 11^12 + 13^14 - ... + (up to n).

Original entry on oeis.org

1, 1, -2, -80, -75, 15545, 15538, -5749256, -5749247, 3481035145, 3481035134, -3134947341576, -3134947341563, 3934241438357713, 3934241438357698, -6564474114274532912, -6564474114274532895, 14056519977953450458097, 14056519977953450458078
Offset: 1

Views

Author

Wesley Ivan Hurt, Sep 18 2018

Keywords

Comments

An alternating version of A318868.

Examples

			   a(1) = 1;
   a(2) = 1^2 = 1;
   a(3) = 1^2 - 3 = -2;
   a(4) = 1^2 - 3^4 = -80;
   a(5) = 1^2 - 3^4 + 5 = -75;
   a(6) = 1^2 - 3^4 + 5^6 = 15545;
   a(7) = 1^2 - 3^4 + 5^6 - 7 = 15538;
   a(8) = 1^2 - 3^4 + 5^6 - 7^8 = -5749256;
   a(9) = 1^2 - 3^4 + 5^6 - 7^8 + 9 = -5749247;
  a(10) = 1^2 - 3^4 + 5^6 - 7^8 + 9^10 = 3481035145;
  a(11) = 1^2 - 3^4 + 5^6 - 7^8 + 9^10 - 11 = 3481035134;
  a(12) = 1^2 - 3^4 + 5^6 - 7^8 + 9^10 - 11^12 = -3134947341576; etc .
		

Crossrefs

Programs

  • Mathematica
    Table[n*Mod[n, 2]*(-1)^(Floor[n/2]) + Sum[(2*i - 1)^(2*i)*(-1)^(i - 1), {i, Floor[n/2]}], {n, 30}]

Formula

a(n) = n*(n mod 2)*(-1)^floor(n/2) + Sum_{i=1..floor(n/2)} (2*i - 1)^(2*i)*(-1)^(i - 1).