OFFSET
1,2
COMMENTS
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..10000
Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).
FORMULA
From Bruno Berselli, Jun 27 2011: (Start)
G.f.: x*(1+6*x+16*x^2+6*x^3+x^4)/((1+x)^2*(1-x)^3).
a(n) = (30*n*(n-1)-3*(2*n-1)*(-1)^n+5)/8. (End)
EXAMPLE
c(0)/b(0) = 1/1 =1.
c(3)/b(3) = (1+2^4+3^4)/(1+2^2+3^2)= (1+16+81)/(1+4+9) = 98/14 = 7.
MAPLE
P:=proc(n) local f, i, j, nu, de; nu:=0; de:=0; for i from 1 by 1 to n do nu:=nu+i^4; de:=de+i^2; f:=nu/de; if trunc(f)=f then print(f); fi; od; end: P(1000);
MATHEMATICA
LinearRecurrence[{1, 2, -2, -1, 1}, {1, 7, 25, 43, 79}, 50] (* Harvey P. Dale, Jan 21 2017 *)
PROG
From Bruno Berselli, Jun 27 2011: (Start)
(Magma) [(30*n*(n-1)-3*(2*n-1)*(-1)^n+5)/8: n in [1..46]];
(PARI) for(n=1, 46, print1((30*n*(n-1)-3*(2*n-1)*(-1)^n+5)/8", "));
(Maxima) makelist((30*n*(n-1)-3*(2*n-1)*(-1)^n+5)/8, n, 1, 46); (End)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paolo P. Lava and Giorgio Balzarotti, Jun 06 2006
STATUS
approved