OFFSET
2,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 2..1000
FORMULA
a(n) = ((357*n^5 - 1982*n^4 + 3893*n^3 - 3472*n^2 + 1336*n + 120)*a(n-1) + 2*(2*n-5)*(51*n^4 - 152*n^3 + 129*n^2 - 4*n - 36)*a(n-2))/(2*(n+2)*(51*n^4 - 356*n^3 + 891*n^2 - 922*n + 300)), for n >= 4, with a(2) = 1, a(3) = 9. - G. C. Greubel, Jun 20 2024
MATHEMATICA
a[n_]:= a[n]= If[n<4, 8*n-15, ((357*n^5 -1982*n^4 +3893*n^3 -3472*n^2 + 1336*n +120)*a[n-1] + 2*(2*n-5)*(51*n^4 -152*n^3 +129*n^2 -4*n -36)*a[n-2])/(2*(n+2)*(51*n^4 -356*n^3 +891*n^2 -922*n +300))];
Table[a[n], {n, 2, 41}] (* G. C. Greubel, Jun 20 2024 *)
PROG
(Magma)
[n le 2 select 8*n-7 else ((357*n^5 -197*n^4 -465*n^3 -115*n^2 -72*n + 252)*Self(n-1) +2*(2*n-3)*(51*n^4 +52*n^3 -21*n^2 +2*n -12)*Self(n-2))/(2*(n+3)*(51*n^4-152*n^3+129*n^2-4*n-36)): n in [1..41]]; // G. C. Greubel, Jun 20 2024
(SageMath)
@CachedFunction
def a(n): # a = A026629
if n<4: return 8*n-15
else: return ((357*n^5 -1982*n^4 +3893*n^3 -3472*n^2 +1336*n + 120)*a(n-1) +2*(2*n-5)*(51*n^4 -152*n^3 +129*n^2 -4*n -36)*a(n-2) )/(2*(n+2)*(51*n^4-356*n^3+891*n^2-922*n+300))
[a(n) for n in range(2, 41)] # G. C. Greubel, Jun 20 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved