OFFSET
1,2
LINKS
Index entries for linear recurrences with constant coefficients, signature (2,-1,1,-2,1).
FORMULA
a(n) = n - 1 + ceiling((2/3)*n^2).
From Elmo R. Oliveira, Apr 01 2026: (Start)
a(n) = 2*a(n-1) - a(n-2) + a(n-3) - 2*a(n-4) + a(n-5).
G.f.: x*(1 + 2*x + x^2 + x^3 - x^4)/((1 - x^3)*(1 - x)^2). (End)
E.g.f.: (9 + exp(x)*(6*x^2 + 15*x - 7) - 2*exp(-x/2)*cos(sqrt(3)*x/2))/9. - Stefano Spezia, Apr 02 2026
MATHEMATICA
a=3/2; b=0;
Table[n+Floor[(a*n+b)^(1/2)], {n, 100}]
Table[n-1+Ceiling[(n*n-b)/a], {n, 80}]
LinearRecurrence[{2, -1, 1, -2, 1}, {1, 4, 8, 14, 21}, 60] (* Harvey P. Dale, Apr 12 2020 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Jan 07 2011
STATUS
approved
