OFFSET
0,2
COMMENTS
In general, the ordinary generating function for the values of cubic polynomial p*n^3 + q*n^2 + k*n + m is (m + (p + q + k - 3*m)*x + (4*p - 2*k + 3*m)*x^2 + (p - q + k - m)*x^3)/(1 - x)^4.
Primes in this sequence: 199, 743, 15583, 105239, 435359, 620999, 770239, 853079, 1738423, 3511103, 7580119, 8737039, 10006063, ...
If a(n) is a positive prime then n is congruent to 0 or 4 (mod 6).
LINKS
Eric Weisstein's World of Mathematics, Cubic Polynomial
Index entries for linear recurrences with constant coefficients, signature (4,-6, 4,-1).
FORMULA
MATHEMATICA
Table[4 n^3 - 3 n^2 - 2 n - 1, {n, 0, 40}]
LinearRecurrence[{4, -6, 4, -1}, {-1, -2, 15, 74}, 41]
CoefficientList[Series[(-1 + 2 x + 17 x^2 + 6 x^3) / (1 - x)^4, {x, 0, 40}], x] (* Vincenzo Librandi, Feb 10 2016 *)
PROG
(Magma) [4*n^3-3*n^2-2*n-1: n in [0..40]]; Vincenzo Librandi, Feb 10 2016
(PARI) a(n)=4*n^3-3*n^2-2*n-1 \\ Charles R Greathouse IV, Jul 26 2016
CROSSREFS
KEYWORD
easy,sign
AUTHOR
Ilya Gutkovskiy, Feb 09 2016
STATUS
approved