OFFSET
1,2
COMMENTS
Prime numbers in this sequence are (43, 211, 883, 3571, 14323, 57331, 234881011, 3758096371, 3848290697203, ... )
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (3,-2).
FORMULA
a(n) = 3*a(n-1) - 2*a(n-2). - Vincenzo Librandi, Jul 15 2012
G.f.: x*(1+12*x)/(1 - 3*x + 2*x^2). - Vincenzo Librandi, Jul 15 2012
a(n) = 7*2^n-13. - Fabio Visonà, Apr 08 2022
EXAMPLE
a(2) = 2*1 + 13 = 15;
a(3) = 2*15 + 13 = 43;
a(4) = 2*43 + 13 = 99.
MATHEMATICA
RecurrenceTable[{a[1]==1, a[n]==2*a[n-1]+13}, a, {n, 40}] (* Vincenzo Librandi, Jul 15 2012 *)
LinearRecurrence[{3, -2}, {1, 15}, 30] (* Harvey P. Dale, Aug 26 2019 *)
PROG
(Magma) I:=[1]; [n le 1 select I[n] else 2*Self(n-1)+13: n in [1..30]]; // Vincenzo Librandi, Jul 15 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Mar 06 2010
STATUS
approved