A014918 a(1)=1, a(n) = n*6^(n-1) + a(n-1).
1, 13, 121, 985, 7465, 54121, 380713, 2620201, 17736745, 118513705, 783641641, 5137206313, 33435376681, 216285092905, 1391747554345, 8914707307561, 56873575734313, 361553445739561, 2291192622439465, 14478387422649385, 91257714663971881, 573870628752284713, 3601169817124428841
Offset: 1
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (13,-48,36).
Programs
-
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
-
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 *)
Formula
From Vincenzo Librandi, Oct 23 2012: (Start)
a(n) = 12*a(n-1) - 36*a(n-2) + 1, a(1)=1, a(2)=13.
G.f.: x/((1-x)*(1-6*x)^2). (End)
From Elmo R. Oliveira, May 15 2025: (Start)
E.g.f.: exp(x)*(1 + exp(5*x)*(30*x - 1))/25.
a(n) = (6^n*(5*n - 1) + 1)/25.
a(n) = 13*a(n-1) - 48*a(n-2) + 36*a(n-3) for n > 3. (End)