OFFSET
1,2
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,4,0,-6,0,4,0,-1).
FORMULA
a(n) = (n^2+1)^3 - (round(sqrt((n^2+1)^3)))^2.
Recurrence formula: a(n)= - a(n-2) + 4*a(n-4) - 6*a(n-6) + 4*a(n-8).
a(n) = -A077119(n^2+1). - R. J. Mathar, Jan 18 2021
a(2*n) = A056107(n). - R. J. Mathar, Jan 18 2021
EXAMPLE
Table of n, n^2, n^2+1, (n^2+1)^3, closest square, difference:
1 1 2 8 9 -1
2 4 5 125 121 4
3 9 10 1000 1024 -24
4 16 17 4913 4900 1
...
MATHEMATICA
aa = {}; Do[AppendTo[aa, (n^2 + 1)^3 - Round[Sqrt[(n^2 + 1)^3]]^2], {n, 1, 50}]; aa
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Artur Jasinski, Dec 05 2013
STATUS
approved