OFFSET
0,1
COMMENTS
Related to Collatz function (for n>0). All terms are divisible by 3.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (9,-24,16).
FORMULA
G.f.: 3*(2-7*x+4*x^2)/((1-x)*(1-4*x)^2). - Bruno Berselli, Dec 16 2011
E.g.f.: ((19 + 24*x)*exp(4*x) - exp(x))/3. - G. C. Greubel, Jan 14 2020
MAPLE
seq( ((6*n+19)*4^n -1)/3, n=0..20); # G. C. Greubel, Jan 14 2020
MATHEMATICA
LinearRecurrence[{9, -24, 16}, {6, 33, 165}, 20] (* G. C. Greubel, Jan 14 2020 *)
Table[((6n+19)4^n-1)/3, {n, 0, 20}] (* Harvey P. Dale, Jun 20 2024 *)
PROG
(PARI) a(n)=((6*n+19)*4^n-1)/3 \\ Charles R Greathouse IV, Oct 07 2015
(Magma) [((6*n+19)*4^n-1)/3: n in [0..20]]; // G. C. Greubel, Jan 14 2020
(Sage) [((6*n+19)*4^n-1)/3 for n in (0..20)] # G. C. Greubel, Jan 14 2020
(GAP) List([0..20], n-> ((6*n+19)*4^n-1)/3); # G. C. Greubel, Jan 14 2020
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. Rathankar (rathankar(AT)yahoo.com), Jul 08 2002
EXTENSIONS
Edited and extended by Henry Bottomley, Aug 06 2002
STATUS
approved