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.

Showing 1-2 of 2 results.

A225144 a(n) = Sum_{i=n..2*n} i^2*(-1)^i.

Original entry on oeis.org

0, 3, 11, 18, 42, 45, 93, 84, 164, 135, 255, 198, 366, 273, 497, 360, 648, 459, 819, 570, 1010, 693, 1221, 828, 1452, 975, 1703, 1134, 1974, 1305, 2265, 1488, 2576, 1683, 2907, 1890, 3258, 2109, 3629, 2340, 4020, 2583, 4431, 2838, 4862, 3105, 5313, 3384
Offset: 0

Views

Author

Bruno Berselli, Jun 06 2013

Keywords

Comments

3 and 11 are the only primes in the sequence.

Examples

			a(6) = 6^2-7^2+8^2-9^2+10^2-11^2+12^2 = 93.
a(7) = -7^2+8^2-9^2+10^2-11^2+12^2-13^2+14^2 = 84.
		

Crossrefs

Cf. A050409: sum(i^2, i=n..2n); A064455: sum(i*(-1)^i, i=n..2n); A065679: A000217(n)+(-1)^n*A000217(n-1); A089594: sum(i^2*(-1)^i, i=1..n).

Programs

  • Magma
    [&+[i^2*(-1)^i: i in [n..2*n]]: n in [0..50]];
  • Mathematica
    Table[Sum[i^2 (-1)^i, {i, n, 2 n}], {n, 0, 50}]

Formula

G.f.: x*(3+11*x+9*x^2+9*x^3)/(1-x^2)^3.
a(n) = 3*a(n-2)-3*a(n-4)+a(n-6).
a(n) = n*(4*n+(n-1)*(-1)^n+2)/2.
a(n) = A000217(2n) +(-1)^n*A000217(n-1) with A000217(-1)=0.
a(2n-1) = A094159(n) for n>0; a(2n) = A055437(n) for A055437(0)=0.

A181427 a(n) = n + [n^2 if n is odd or n^3 if n is even].

Original entry on oeis.org

2, 10, 12, 68, 30, 222, 56, 520, 90, 1010, 132, 1740, 182, 2758, 240, 4112, 306, 5850, 380, 8020, 462, 10670, 552, 13848, 650, 17602, 756, 21980, 870, 27030, 992, 32800, 1122, 39338, 1260, 46692, 1406, 54910, 1560, 64040, 1722, 74130, 1892, 85228, 2070
Offset: 1

Views

Author

Dinesh Panchamia (dgpanchamia(AT)gmail.com), Oct 19 2010

Keywords

Comments

a(2*k+1) = 2*A000384(k+1) (k in A001477). - Bruno Berselli, Oct 20 2010

Examples

			For n=5, 5+5^2=30 and n=6 6+6^3=222.
		

Crossrefs

Programs

  • Mathematica
    If[OddQ[ # ],#+#^2,#+#^3]&/@Range[50] (* Harvey P. Dale, Nov 03 2010 *)

Formula

a(n) = n + n^(2*(n mod 2)+3*(1-(n mod 2))).
a(n) = n + n^((5+(-1)^n)/2) = n*(1+A065679(n)).
G.f.: 2*x*(1+5*x+2x^2+14*x^3-3*x^4+5*x^5)/(1-x^2)^4.
a(n)-4*a(n-2)+6*a(n-4)-4*a(n-6)+a(n-8) = 0 for n>8.
a(2*n) = A034262(2*n). a(2*n+1) = A002939(n+1).

Extensions

Formulas and more terms from R. J. Mathar and Bruno Berselli, Oct 19 2010
Showing 1-2 of 2 results.