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.

A099392 a(n) = floor((n^2 - 2*n + 3)/2).

Original entry on oeis.org

1, 1, 3, 5, 9, 13, 19, 25, 33, 41, 51, 61, 73, 85, 99, 113, 129, 145, 163, 181, 201, 221, 243, 265, 289, 313, 339, 365, 393, 421, 451, 481, 513, 545, 579, 613, 649, 685, 723, 761, 801, 841, 883, 925, 969, 1013, 1059, 1105, 1153, 1201, 1251, 1301, 1353, 1405
Offset: 1

Views

Author

Ralf Stephan following a suggestion from Luke Pebody, Oct 20 2004

Keywords

Crossrefs

Differs from A085913 at n = 61. Apart from leading term, identical to A080827.
Cf. A000217, A001844, A002522, A007494, A007590, A058331 (bisections).
From Guenther Schrack, Apr 17 2018: (Start)
First differences: A052928.
Partial sums: A212964(n) + n for n > 0.
Also A058331 and A001844 interleaved. (End)

Programs

  • Mathematica
    Array[Floor[(#^2 - 2 # + 3)/2] &, 54] (* or *)
    Rest@ CoefficientList[Series[x (-1 + x - x^2 - x^3)/((1 + x) (x - 1)^3), {x, 0, 54}], x] (* Michael De Vlieger, Apr 21 2018 *)
  • PARI
    a(n)=(n^2+3)\2-n \\ Charles R Greathouse IV, Aug 01 2013

Formula

a(n) = ceiling(n^2/2)-n+1. - Paul Barry, Jul 16 2006; index shifted by R. J. Mathar, Jul 29 2007
a(n) = ceiling(A002522(n-1)/2). - Branko Curgus, Sep 02 2007
From R. J. Mathar, Feb 20 2011: (Start)
G.f.: x *( -1+x-x^2-x^3 ) / ( (1+x)*(x-1)^3 ).
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4).
a(n+1) = (3 + 2*n^2 + (-1)^n)/4. (End)
a(n) = A007590(n-1) + 1 for n >= 2. - Richard R. Forberg, Aug 01 2013
a(n) = A000217(n) - A007494(n-1). - Bui Quang Tuan, Mar 27 2015
From Guenther Schrack, Apr 17 2018: (Start)
a(n) = (2*n^2 - 4*n + 5 -(-1)^n)/4.
a(n+2) = a(n) + 2*n for n > 0.
a(n) = 2*A033683(n-1) - 1 for n > 0.
a(n) = A047838(n-1) + 2 for n > 2.
a(n) = A074148(n-1) - n + 2 for n > 1.
a(n) = A183575(n-3) + 3 for n > 3.
a(n) = 2*A290743(n-1) - 3 for n > 0.
a(n) = 2*A290743(n-2) + A109613(n-5) for n > 4.
a(n) = A074148(n) - A014601(n-1) for n > 0. (End)
Sum_{n>=1} 1/a(n) = tanh(Pi/2)*Pi/2 + coth(Pi/sqrt(2))*Pi/(2*sqrt(2)) + 1/2. - Amiram Eldar, Sep 16 2022
E.g.f.: ((2 - x + x^2)*cosh(x) + (3 - x + x^2)*sinh(x) - 2)/2. - Stefano Spezia, Jan 28 2024