Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #28 Oct 07 2015 11:28:11
%S 1,1,5,19,49,101,181,295,449,649,901,1211,1585,2029,2549,3151,3841,
%T 4625,5509,6499,7601,8821,10165,11639,13249,15001,16901,18955,21169,
%U 23549,26101,28831,31745,34849,38149,41651,45361,49285,53429,57799,62401,67241,72325
%N a(n) = n^3 - n^2 + 1.
%C Appears to be the number of possible distinct sums of a set of n distinct integers between 1 and n^2. Checked up to n=6. - _Dylan Hamilton_, Sep 21 2010
%C a(n) = A100104(n+1) - A100104(n). - _Reinhard Zumkeller_, Jul 07 2012
%D T. A. Gulliver, Sequences from Cubes of Integers, Int. Math. Journal, 4 (2003), 439-445.
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (4, -6, 4, -1).
%F From _Harvey P. Dale_, Sep 11 2011: (Start)
%F a(0)=1, a(1)=1, a(2)=5, a(3)=19, a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4).
%F G.f.: (x^3+7*x^2-3*x+1)/(x-1)^4. (End)
%t f[n_]:=n^3-n^2+1;Table[f[n],{n,5!}] (* _Vladimir Joseph Stephan Orlovsky_, Feb 07 2010 *)
%t Array[#^3-#^2+1&,50,0] (* or *) LinearRecurrence[{4,-6,4,-1},{1,1,5,19},50] (* _Harvey P. Dale_, Sep 11 2011 *)
%o (Haskell)
%o a049451 n = n * (3 * n + 1) -- _Reinhard Zumkeller_, Jul 07 2012
%o (PARI) a(n)=n^3-n^2+1 \\ _Charles R Greathouse IV_, Oct 07 2015
%Y Cf. A162611. - _Vincenzo Librandi_, May 27 2010
%Y Cf. A049451 (first differences).
%K nonn,easy
%O 0,3
%A _N. J. A. Sloane_, Jan 12 2005