login
A014918
a(1)=1, a(n) = n*6^(n-1) + a(n-1).
3
1, 13, 121, 985, 7465, 54121, 380713, 2620201, 17736745, 118513705, 783641641, 5137206313, 33435376681, 216285092905, 1391747554345, 8914707307561, 56873575734313, 361553445739561, 2291192622439465, 14478387422649385
OFFSET
1,2
FORMULA
a(1)=1, a(2)=13, a(n) = 12*a(n-1) - 36*a(n-2) + 1. - Vincenzo Librandi, Oct 23 2012
G.f.: x/((1-x)*(1-6*x)^2). - Vincenzo Librandi, Oct 23 2012
MAPLE
a:=n->sum (6^n-6^j, j=0..n): seq(a(n)/5, n=1..31); # Zerinvary Lajos, Dec 14 2008
MATHEMATICA
CoefficientList[Series[1/((1 - x)(1 - 6*x)^2), {x, 0, 40}], x] (* Vincenzo Librandi, Oct 23 2012 *)
nxt[{n_, a_}]:={n+1, (n+1*6^n+a}; Transpose[NestList[nxt, {1, 1}, 20]][[2]] (* or *) LinearRecurrence[{13, -48, 36}, {1, 13, 121}, 20] (* Harvey P. Dale, Apr 08 2014 *)
PROG
(Magma) I:=[1, 13]; [n le 2 select I[n] else 12*Self(n-1)-36*Self(n-2)+1: n in [1..30]]; // Vincenzo Librandi, Oct 23 2012
CROSSREFS
Sequence in context: A188709 A054962 A297394 * A081033 A091111 A196921
KEYWORD
nonn,easy
STATUS
approved