login
A247840
Sum(6^k, k=2..n).
2
0, 36, 252, 1548, 9324, 55980, 335916, 2015532, 12093228, 72559404, 435356460, 2612138796, 15672832812, 94036996908, 564221981484, 3385331888940, 20311991333676, 121871948002092, 731231688012588, 4387390128075564, 26324340768453420
OFFSET
1,2
FORMULA
G.f.: 36*x^2/((1-x)*(1-6*x)).
a(n) = a(n-1) + 6^n = (6^(n+1) - 36)/5 = 7*a(n-1) - 6*a(n-2).
a(n) = A105281(n) - 6. - Michel Marcus, Sep 25 2014
MATHEMATICA
RecurrenceTable[{a[1] == 0, a[n] == a[n-1] + 6^n}, a, {n, 30}] (* or *) CoefficientList[Series[36 x / ((1 - x) (1 - 6 x)), {x, 0, 30}], x]
Join[{0}, Accumulate[6^Range[2, 30]]] (* or *) LinearRecurrence[{7, -6}, {0, 36}, 30] (* Harvey P. Dale, Jun 11 2016 *)
PROG
(Magma) [0] cat [&+[6^k: k in [2..n]]: n in [2..30]]; /* or */ [(6^(n+1)-36)/5: n in [1..30]];
(PARI) a(n) = sum(k=2, n, 6^k); \\ Michel Marcus, Sep 25 2014
CROSSREFS
Cf. similar sequences listed in A247817.
Sequence in context: A233363 A030165 A282099 * A017342 A341544 A115332
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Sep 25 2014
STATUS
approved