OFFSET
0,1
COMMENTS
Note that 997 is the largest three-digit prime and 1009 is the smallest four-digit prime.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..10000
Tanya Khovanova, Recursive Sequences.
Index entries for linear recurrences with constant coefficients, signature (2,-1).
FORMULA
From Elmo R. Oliveira, Dec 07 2024: (Start)
G.f.: (1009 - 12*x)/(1 - x)^2.
E.g.f.: (1009 + 997*x)*exp(x).
a(n) = 2*a(n-1) - a(n-2) for n > 1. (End)
EXAMPLE
If n=1, 997*1 + 1009 = 2006.
If n=2, 997*2 + 1009 = 3003.
MAPLE
MATHEMATICA
Table[997 n + 1009, {n, 0, 50}] (* Wesley Ivan Hurt, Jan 22 2014 *)
PROG
(Magma) [997 * n + 1009: n in [0..50]]; // Vincenzo Librandi, Jul 14 2011
(PARI) a(n)=997*n+1009 \\ Charles R Greathouse IV, Jul 10 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Parthasarathy Nambi, Jan 03 2005
EXTENSIONS
More terms from C. Ronaldo (aga_new_ac(AT)hotmail.com), Jan 19 2005
Edited by Ray Chandler, Jan 25 2005
STATUS
approved