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.

A184005 a(n) = n - 1 + ceiling(3*n^2/4); complement of A184004.

Original entry on oeis.org

1, 4, 9, 15, 23, 32, 43, 55, 69, 84, 101, 119, 139, 160, 183, 207, 233, 260, 289, 319, 351, 384, 419, 455, 493, 532, 573, 615, 659, 704, 751, 799, 849, 900, 953, 1007, 1063, 1120, 1179, 1239, 1301, 1364, 1429, 1495, 1563, 1632, 1703, 1775, 1849, 1924, 2001, 2079, 2159, 2240, 2323, 2407, 2493, 2580, 2669, 2759
Offset: 1

Views

Author

Clark Kimberling, Jan 08 2011

Keywords

Crossrefs

Cf. A184004.

Programs

  • Magma
    [(6*n^2 + 8*n - (-1)^n - 7)/8: n in [1..80]]; // Vincenzo Librandi, Feb 09 2011
    
  • Mathematica
    a=4/3; b=0;
    Table[n+Floor[(a*n+b)^(1/2)],{n,80}]
    Table[n-1+Ceiling[(n*n-b)/a],{n,60}]
    Table[n - 1 + Ceiling[3 n^2/4], {n, 60}] (* or *) CoefficientList[ Series[x (1 + 2 x + x^2 - x^3)/((1 + x) (1 - x)^3), {x, 0, 60}], x] (* or *) Table[Round[(6 n^2 + 8 n - 7)/8], {n, 60}] (* Michael De Vlieger, Mar 23 2016 *)
    LinearRecurrence[{2,0,-2,1},{1,4,9,15},60] (* Harvey P. Dale, Sep 16 2016 *)
  • PARI
    my(x='x+O('x^200)); Vec(x*(1+2*x+x^2-x^3)/((1+x)*(1-x)^3)) \\ Altug Alkan, Mar 23 2016
    
  • Python
    def A184005(n): return n+((m:=3*n**2)>>2)-(not m&3) # Chai Wah Wu, Oct 01 2024

Formula

a(n) = 2*a(n-1) - 2*a(n-3) + 1*a(n-4).
From Bruno Berselli, Jan 25 2011: (Start)
G.f.: x*(1 + 2*x + x^2 - x^3)/((1 + x)*(1 - x)^3).
a(n) = (6*n^2 + 8*n - (-1)^n - 7)/8. (End)
a(n) = round((6*n^2 + 8*n - 7)/8). - Bruno Berselli, Jan 25 2011
From Paul Curtz, Feb 09 2011: (Start)
a(n) - a(n-1) = A007494(n).
a(n) - a(n-2) = 3*n - 1 = A016789(n-1).
a(n) - a(n-4) = 6*n - 8 = A016957(n-2).
a(n) - a(n-8) = 12*n - 40 = A017617(n-4).
a(n) - a(n-16) = 24*n - 176 = 8*A016789(n-8).
a(n) - a(n-32) = 48*n - 736 = 16*A016789(n-16). (End)
a(n) = n^2 - floor((n-2)^2/4). - Bruno Berselli, Jan 17 2017
a(n) = A002061(n+2) - A002620(n+4). - Anton Zakharov, May 17 2017
E.g.f.: (1/8)*(8 + (6*x^2 + 14*x -7)*exp(x) - exp(-x)). - G. C. Greubel, Jul 22 2017