login
A156202
a(n) = 2*a(n-1)+3 for n > 1, a(1) = 10.
2
10, 23, 49, 101, 205, 413, 829, 1661, 3325, 6653, 13309, 26621, 53245, 106493, 212989, 425981, 851965, 1703933, 3407869, 6815741, 13631485, 27262973, 54525949, 109051901, 218103805, 436207613, 872415229, 1744830461, 3489660925, 6979321853, 13958643709
OFFSET
1,1
FORMULA
a(n) = -3+13*2^(n-1).
G.f.: x*(10-7*x)/(1-3*x+2*x^2). - Vincenzo Librandi, May 02 2012
a(n) = 3*a(n-1) - 2*a(n-2). - Vincenzo Librandi, May 02 2012
MATHEMATICA
LinearRecurrence[{3, -2}, {10, 23}, 30] (* Vincenzo Librandi, May 02 2012 *)
NestList[2#+3&, 10, 40] (* Harvey P. Dale, Jul 08 2019 *)
PROG
(Magma) I:=[10, 23]; [n le 2 select I[n] else 3*Self(n-1)-2*Self(n-2): n in [1..30]]; // Vincenzo Librandi, May 02 2012
(Python)
from itertools import accumulate
def f(an, _): return 2*an + 3
print(list(accumulate([10]*31, f))) # Michael S. Branicky, Oct 23 2021
CROSSREFS
Sequence in context: A140674 A072245 A135277 * A266080 A316093 A262485
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Feb 08 2009
EXTENSIONS
Definition and closed form corrected by Paolo P. Lava, Feb 13 2009
STATUS
approved