OFFSET
1,1
COMMENTS
Corresponding cubes are listed in A016791.
Primes in the sequence: 2, 41, 443, 1637, 22973, 34607, 91541, 234989, ...
LINKS
Bruno Berselli, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
MATHEMATICA
Table[9 n^3 - 9 n^2 + 3 n - 1, {n, 0, 40}]
LinearRecurrence[{4, -6, 4, -1}, {2, 41, 170, 443}, 40] (* Harvey P. Dale, Aug 28 2021 *)
PROG
(Python) [9*n**3-9*n**2+3*n-1 for n in range(1, 40)]
(Sage) [9*n^3-9*n^2+3*n-1 for n in (1..40)]
(Maxima) makelist(9*n^3-9*n^2+3*n-1, n, 1, 40);
(Magma) [9*n^3-9*n^2+3*n-1: n in [1..40]];
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Bruno Berselli, May 23 2017
STATUS
approved