OFFSET
0,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..300
Index entries for linear recurrences with constant coefficients, signature (9,-15,7).
FORMULA
a(n) = 7*a(n-1) - 42*(n-1) + 1, with n > 0. For n=5, a(5) = 7*2430 - 42*4 + 1 = 16843. - Bruno Berselli, May 18 2010
From R. J. Mathar, May 22 2010: (Start)
a(n) = 9*a(n-1) - 15*a(n-2) + 7*a(n-3).
G.f.: (-2 + 3*x + 41*x^2) / ((7*x-1)*(x-1)^2). (End)
E.g.f.: exp(x)*(1 + exp(6*x) + 7*x). - Stefano Spezia, Aug 19 2024
EXAMPLE
a(5) = 7^5 + 7*5 + 1 = 16843 is prime.
MATHEMATICA
Table[7^n+7n+1, {n, 0, 20}] (* or *) LinearRecurrence[{9, -15, 7}, {2, 15, 64}, 20] (* Harvey P. Dale, Apr 17 2014 *)
PROG
(Magma) [7^n + 7*n + 1: n in [0..25]]; // Vincenzo Librandi, May 06 2011
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Jonathan Vos Post, Apr 29 2010
STATUS
approved