A058919 a(n) = n^4/2 - n^3 + 3*n^2/2 - n + 1 = (n^2 + 1)*(n^2 - 2*n + 2)/2.
1, 1, 5, 25, 85, 221, 481, 925, 1625, 2665, 4141, 6161, 8845, 12325, 16745, 22261, 29041, 37265, 47125, 58825, 72581, 88621, 107185, 128525, 152905, 180601, 211901, 247105, 286525, 330485, 379321, 433381, 493025, 558625, 630565, 709241, 795061, 888445, 989825, 1099645
Offset: 0
Links
- Harry J. Smith, Table of n, a(n) for n = 0..500
- Henry Bottomley, Source
- Index entries for linear recurrences with constant coefficients, signature (5,-10,10,-5,1).
Programs
-
Magma
[n^4/2 - n^3 + 3*n^2/2 - n + 1: n in [0..30]]; // Wesley Ivan Hurt, May 10 2014
-
Maple
A058919:=n->n^4/2 - n^3 + 3*n^2/2 - n + 1; seq(A058919(n), n=0..30); # Wesley Ivan Hurt, May 10 2014
-
Mathematica
Table[n^4/2 - n^3 + 3 n^2/2 - n + 1, {n, 0, 30}] (* Wesley Ivan Hurt, May 10 2014 *)
-
PARI
a(n) = { (n^4 + 3*n^2)/2 - n^3 - n + 1 } \\ Harry J. Smith, Jun 23 2009
Formula
G.f.: (1 - 4*x + 10*x^2 + 5*x^4)/(1 - x)^5. - Colin Barker, Jan 01 2012
a(n) = A080827(n^2-n+1). - David James Sycamore, Jul 31 2018
E.g.f.: exp(x)*(2 + 4*x^2 + 4*x^3 + x^4)/2. - Stefano Spezia, Oct 08 2022
For n>1, a(n) = A000217(n-1)^2 + (A000217(n-1)+1)^2 = (A000217(n)-1)^2 + (A000217(n-2)-1)^2. - Charlie Marion, Feb 08 2024
Comments