OFFSET
1,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = ( (357*n^4 - 1625*n^3 + 2157*n^2 - 841*n + 60)*a(n-1) + 2*(2*n-5)*(51*n^3 - 101*n^2 + 34*n + 6)*a(n-2) )/(2*(n+1)*(51*n^3 - 254*n^2 + 389*n - 180)), for n >= 3, with a(1) = 1, a(2) = 6. - G. C. Greubel, Jun 19 2024
MATHEMATICA
a[n_]:= a[n]= If[n<3, 5*n-4, ((357*n^4 -1625*n^3 +2157*n^2 -841*n +60 )*a[n-1] +2*(2*n-5)*(51*n^3 -101*n^2 +34*n +6)*a[n-2])/(2*(n+1)*(51*n^3 -254*n^2 +389*n -180))];
Table[a[n], {n, 41}]
PROG
(Magma)
[n le 2 select 5*n-4 else ((357*n^4-1625*n^3+2157*n^2-841*n+60)*Self(n-1) +2*(2*n-5)*(51*n^3-101*n^2+34*n+6)*Self(n-2))/(2*(n+1)*(51*n^3-254*n^2+389*n-180)): n in [1..41]]; // G. C. Greubel, Jun 19 2024
(SageMath)
@CachedFunction
def a(n): # a = A026628
if n<3: return 5*n-4
else: return ((357*n^4 -1625*n^3 +2157*n^2 -841*n +60)*a(n-1) +2*(2*n-5)*(51*n^3 -101*n^2 +34*n +6)*a(n-2))/(2*(n+1)*(51*n^3-254*n^2+389*n-180))
[a(n) for n in range(1, 41)] # G. C. Greubel, Jun 19 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved