OFFSET
0,3
COMMENTS
For n > 0, a(n) is the largest number k such that k^3 + n is divisible by k + n, or -1 if k is infinite. The resulting integer is n^6 - 5n^4 + 7n^2 - 1.
For n > 1, a(n) is also the largest number k such that k + n^3 is divisible by k + n. - Derek Orr, Oct 16 2014
a(n)^2 has the form m^3 + 2*m^2, where m = n^2 - 2. - Bruno Berselli, May 03 2018
LINKS
Jens Kruse Andersen, Table of n, a(n) for n = 0..10000
Spencer Daugherty, Pamela E. Harris, Ian Klein, and Matt McClinton, Metered Parking Functions, arXiv:2406.12941 [math.CO], 2024. See pp. 12, 22.
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
G.f.: -x*(1-8*x+x^2)/(1-x)^4. - Vincenzo Librandi, Oct 17 2014
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) for n > 3. - Vincenzo Librandi, Oct 17 2014
E.g.f.: exp(x)*x*(x^2 + 3*x - 1). - Stefano Spezia, Mar 04 2023
EXAMPLE
a(2) = 4. n = 2, k = 4. 4^3 + 2 = 66. k + n = 6 and 66 comes from the largest value of k such that k^3 + n is divisible by k + n. The resulting integer is 11 = n^6 - 5n^4 + 7n^2 - 1. - Jon Perry, Aug 16 2014
MAPLE
MATHEMATICA
Table[n^3 - 2 n, {n, 0, 50}] (* Wesley Ivan Hurt, Aug 16 2014 *)
CoefficientList[Series[- x (1 - 8 x + x^2)/(1 - x)^4, {x, 0, 50}], x] (* Vincenzo Librandi, Oct 17 2014 *)
PROG
(PARI) vector(100, n, (n-1)^3 - 2*(n-1))
(Magma) [n^3-2*n: n in [0..45]] /* or */ I:=[0, -1, 4, 21]; [n le 4 select I[n] else 4*Self(n-1)-6*Self(n-2)+4*Self(n-3)-Self(n-4): n in [1..50]]; // Vincenzo Librandi, Oct 17 2014
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Derek Orr, Aug 16 2014
STATUS
approved