A206481 a(n) + a(n+2) = n^3.
0, 1, 1, 7, 26, 57, 99, 159, 244, 353, 485, 647, 846, 1081, 1351, 1663, 2024, 2433, 2889, 3399, 3970, 4601, 5291, 6047, 6876, 7777, 8749, 9799, 10934, 12153, 13455, 14847, 16336, 17921, 19601, 21383, 23274, 25273, 27379, 29599, 31940, 34401, 36981, 39687
Offset: 1
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (4,-7,8,-7,4,-1).
Crossrefs
Cf. A144129 (bisection).
Programs
-
Mathematica
LinearRecurrence[{4, -7, 8, -7, 4, -1}, {0, 1, 1, 7, 26, 57}, 60] RecurrenceTable[{a[1]==0,a[2]==1,a[n]==(n-2)^3-a[n-2]},a,{n,50}] (* Harvey P. Dale, Sep 14 2012 *)
-
Python
prpr = 0 prev = 1 for n in range(1,77): print(prpr, end=',') curr = n*n*n - prpr # a(n+1) prpr = prev prev = curr
Formula
a(n) = (1/2)*((n-3)*n^2-4*cos((Pi*n)/2)+2). - Harvey P. Dale, Sep 14 2012
G.f.: x^2*(1 - 3*x + 10*x^2 - 3*x^3 + x^4)/((1-x)^4*(1+x^2)). - Paul D. Hanna, Sep 14 2012
Comments