OFFSET
1,3
COMMENTS
For n > 0, a(n) is the largest number k such that k + n divides k + n^4, or -1 if k is infinite. In general, for m > 0 and n > 0, the largest number k such that k + n divides k + n^m is given by k = n^m - 2*n. If k = -1 (when n = 1 for any m or when m = 1 for any n), it is infinite.
LINKS
Index entries for linear recurrences with constant coefficients, signature (5,-10,10,-5,1).
FORMULA
G.f.: -x^2*(3*x^3+5*x^2+17*x-1) / (x-1)^5. - Colin Barker, Sep 04 2014
a(n) = 5*a(n-1)-10*a(n-2)+10*a(n-3)-5*a(n-4)+a(n-5). - Wesley Ivan Hurt, Jun 07 2021
MATHEMATICA
Table[n^4-2n, {n, 0, 40}] (* or *) LinearRecurrence[{5, -10, 10, -5, 1}, {0, -1, 12, 75, 248}, 40] (* Harvey P. Dale, May 05 2019 *)
PROG
(PARI) vector(100, n, (n-1)^4-2*(n-1))
(PARI) concat(0, Vec(-x^2*(3*x^3+5*x^2+17*x-1)/(x-1)^5 + O(x^100))) \\ Colin Barker, Sep 04 2014
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Derek Orr, Sep 04 2014
STATUS
approved