A168297 a(n) = n^3 + (1-n)^2.
1, 1, 9, 31, 73, 141, 241, 379, 561, 793, 1081, 1431, 1849, 2341, 2913, 3571, 4321, 5169, 6121, 7183, 8361, 9661, 11089, 12651, 14353, 16201, 18201, 20359, 22681, 25173, 27841, 30691, 33729, 36961, 40393, 44031, 47881, 51949, 56241, 60763, 65521
Offset: 0
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (4, -6, 4, -1).
Crossrefs
Cf. A153257.
Programs
-
Magma
[n^3+(1-n)^2: n in [0..40]]; // Vincenzo Librandi, Jul 18 2016
-
Mathematica
Table[n^3 + (1 - n)^2, {n, 0, 50}] (* or *) LinearRecurrence[{4,-6,4,-1}, {1, 1, 9, 31}, 50] (* G. C. Greubel, Jul 17 2016 *)
-
PARI
a(n)=n^3+(n-1)^2 \\ Charles R Greathouse IV, Oct 18 2022
Formula
G.f.: (1 - 3*x + 11*x^2 - 3*x^3)/(1-x)^4. - R. J. Mathar, Nov 24 2009
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). - G. C. Greubel, Jul 17 2016
Extensions
Flipped/normalized the sign of n - R. J. Mathar, Nov 24 2009
Further edited by N. J. A. Sloane, Nov 24 2009