OFFSET
1,2
LINKS
Iain Fox, Table of n, a(n) for n = 1..1104 (first 1000 terms from Vincenzo Librandi)
Index entries for linear recurrences with constant coefficients, signature (17,-80,64).
FORMULA
G.f.: -x/((x-1)*(8*x-1)^2). - Colin Barker, Oct 15 2012
a(1)=1, a(2)=17, a(n) = 16*a(n-1) - 64*a(n-2) + 1. - Vincenzo Librandi, Oct 23 2012
E.g.f.: (exp(x) + exp(8*x)*(56*x - 1))/49. - Iain Fox, Aug 10 2018
MAPLE
a:=n->sum (8^n-8^j, j=0..n): seq(a(n)/7, n=1..21); # Zerinvary Lajos, Dec 14 2008
MATHEMATICA
CoefficientList[Series[1/((1 - x)(1 - 8*x)^2), {x, 0, 40}], x] (* Vincenzo Librandi, Oct 23 2012 *)
a[n_] := (1 + (7 n - 1) 8^n)/49; Array[a, 19, 0] (* Robert G. Wilson v, Aug 10 2018 *)
PROG
(Magma) I:=[1, 17]; [n le 2 select I[n] else 16*Self(n-1)-64*Self(n-2)+1: n in [1..30]]; // Vincenzo Librandi, Oct 23 2012
(PARI) first(n) = my(res=vector(n)); res[1]=1; for(x=2, n, res[x]=x*8^(x-1)+res[x-1]); res \\ Iain Fox, Aug 10 2018
(PARI) a(n) = (1 + 8^n*(7*n-1))/49 \\ Iain Fox, Aug 10 2018
(PARI) first(n) = Vec(x/((1-x)*(1-8*x)^2) + O(x^(n+1))) \\ Iain Fox, Aug 10 2018
(GAP) a:=[1];; for n in [2..20] do a[n]:=n*8^(n-1)+a[n-1]; od; a; # Muniru A Asiru, Aug 12 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved