A172241 a(n) = (1/18)*(8^n - (-1)^n - 9).
0, 3, 28, 227, 1820, 14563, 116508, 932067, 7456540, 59652323, 477218588, 3817748707, 30541989660, 244335917283, 1954687338268, 15637498706147, 125099989649180, 1000799917193443, 8006399337547548, 64051194700380387
Offset: 1
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..200
- Index entries for linear recurrences with constant coefficients, signature (8, 1, -8).
Programs
-
Maple
A172241:=n->(8^n-(-1)^n-9)/18: seq(A172241(n), n=1..30); # Wesley Ivan Hurt, May 02 2017
-
Mathematica
LinearRecurrence[{8,1,-8},{0,3,28},30] (* Harvey P. Dale, Oct 29 2023 *)
-
PARI
a(n)=(8^n-(-1)^n-9)/18
Formula
G.f.: x^2*(3 + 4*x)/((1 - x)*(1 + x)*(1 - 8*x)). - Adapted to the offset by Bruno Berselli, May 03 2011
a(2*k) = 8*a(2*k-1) + 3 and a(2*k+1) = 8*a(2*k) + 4 for k>0, a(1)=0. - Yosu Yurramendi, Dec 30 2016
Comments