OFFSET
1,1
COMMENTS
Shifted variant of A102305. - R. J. Mathar, Oct 20 2011
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..10000
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
a(n) = n^2 + 2, n > 1.
a(n) = a(n-1) + 2*n - 1, n > 2.
From G. C. Greubel, Feb 04 2024: (Start)
G.f.: x*(4 - 6*x + 5*x^2 - x^3)/(1 - x)^3.
E.g.f.: -2 + x + (2 + x + x^2)*exp(x). (End)
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 4. - Chai Wah Wu, May 09 2024
MATHEMATICA
Table[Floor[(n+1/n)^2+1/2], {n, 50}] (* Harvey P. Dale, Aug 12 2012 *)
Join[{4}, 2+Range[2, 50]^2] (* G. C. Greubel, Feb 04 2024 *)
PROG
(Magma) [Round((n+1/n)^2): n in [1..60]]
(SageMath) [4]+[n^2+2 for n in range(2, 51)] # G. C. Greubel, Feb 04 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Oct 20 2011
STATUS
approved