OFFSET
0,3
COMMENTS
If p >= 7 is a prime, then p divides a(p) (provable by easy application of Fermat's Little Theorem). - Adam P. Goucher, Sep 11 2013
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,5,-6).
FORMULA
MATHEMATICA
Table[{1, 0, 0}.MatrixPower[{{0, 3, 0}, {1, 0, 2}, {0, 1, 2}}, n].{1, 0, 0}, {n, 1, 100}] (* Adam P. Goucher, Sep 11 2013 *)
LinearRecurrence[{2, 5, -6}, {1, 0, 3}, 30] (* G. C. Greubel, Feb 01 2019 *)
PROG
(PARI) vector(30, n, n--; (3^n+(-2)^(n+2)+5)/10) \\ G. C. Greubel, Feb 01 2019
(Magma) [(3^n+(-2)^(n+2)+5)/10: n in [0..30]]; // G. C. Greubel, Feb 01 2019
(Sage) [(3^n+(-2)^(n+2)+5)/10 for n in (0..30)] # G. C. Greubel, Feb 01 2019
(GAP) List([0..30], n -> (3^n+(-2)^(n+2)+5)/10) # G. C. Greubel, Feb 01 2019
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Dec 12 2003
STATUS
approved