cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A197985 a(n) = round((n+1/n)^2).

Original entry on oeis.org

4, 6, 11, 18, 27, 38, 51, 66, 83, 102, 123, 146, 171, 198, 227, 258, 291, 326, 363, 402, 443, 486, 531, 578, 627, 678, 731, 786, 843, 902, 963, 1026, 1091, 1158, 1227, 1298, 1371, 1446, 1523, 1602, 1683, 1766, 1851, 1938, 2027
Offset: 1

Views

Author

Vincenzo Librandi, Oct 20 2011

Keywords

Comments

Shifted variant of A102305. - R. J. Mathar, Oct 20 2011

Crossrefs

Programs

  • Magma
    [Round((n+1/n)^2): n in [1..60]];
    
  • 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 *)
  • SageMath
    [4]+[n^2+2 for n in range(2,51)] # G. C. Greubel, Feb 04 2024

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