OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..900
Index entries for linear recurrences with constant coefficients, signature (22,-163,462,-432).
FORMULA
a(n) = -4*2^n/21+9*3^n/10-256*8^n/15+243*9^n/14. - R. J. Mathar, Jun 20 2013
a(0)=1, a(1)=22, a(2)=321, a(3)=3938, a(n)=22*a(n-1)-163*a(n-2)+462*a(n-3)-432*a(n-4). - Harvey P. Dale, Oct 04 2014
a(n) = 3^(n+1)-2^(n+1)+17*a(n-1)-72*a(n-2). - Vincenzo Librandi, May 12 2026
MATHEMATICA
CoefficientList[Series[1/((1-2*x)*(1-3*x)*(1-8*x)*(1-9*x)), {x, 0, 20}], x] (* Harvey P. Dale, Oct 04 2014 *)
(* Alternative: *)
LinearRecurrence[{22, -163, 462, -432}, {1, 22, 321, 3938}, 20] (* Harvey P. Dale, Oct 04 2014 *)
(* Alternative: *)
a[0]=1; a[1]=22; a[n_]:=a[n]=3^(n+1)-2^(n+1)+17*a[n-1]-72*a[n-2]; Table[a[n], {n, 0, 25}] (* Vincenzo Librandi, May 12 2026 *)
PROG
(Magma) I:=[1, 22]; [n le 2 select I[n] else 3^n-2^n+17*Self(n-1)-72*Self(n-2): n in [1..22]]; // Vincenzo Librandi, May 12 2026
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from Vincenzo Librandi, May 12 2026
STATUS
approved
