OFFSET
1,1
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (2,-1).
FORMULA
a(n) = floor(3n+1+(5+n)/(1+n+n^2)) = 3n+1 = A112414(n-2) for n>2. - R. J. Mathar, Dec 13 2008
a(n) = 2*a(n-1)-a(n-2) for n>4. - Colin Barker, May 23 2015
G.f.: x*(x^3-4*x+6) / (x-1)^2. - Colin Barker, May 23 2015
EXAMPLE
a(3) = floor((6*3^0+5*3^1+4*3^2+3*3^3)/(1*3^0+1*3^1+1*3^2)) = floor(138/13) = floor(10.615) = 10.
MATHEMATICA
Table[Floor[(6+5n+4n^2+3n^3)/(1+n+n^2)], {n, 60}] (* Harvey P. Dale, Apr 22 2018 *)
PROG
(PARI) Vec(x*(x^3-4*x+6)/(x-1)^2 + O(x^100)) \\ Colin Barker, May 23 2015
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Wang Dan (wangdan01(AT)lycos.com), Aug 07 2003
STATUS
approved