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.

Showing 1-2 of 2 results.

A183867 a(n) = n + floor(2*sqrt(n)); complement of A184676.

Original entry on oeis.org

3, 4, 6, 8, 9, 10, 12, 13, 15, 16, 17, 18, 20, 21, 22, 24, 25, 26, 27, 28, 30, 31, 32, 33, 35, 36, 37, 38, 39, 40, 42, 43, 44, 45, 46, 48, 49, 50, 51, 52, 53, 54, 56, 57, 58, 59, 60, 61, 63, 64, 65, 66, 67, 68, 69, 70, 72, 73, 74, 75, 76, 77, 78, 80, 81, 82, 83
Offset: 1

Views

Author

Clark Kimberling, Jan 07 2011

Keywords

Comments

Also equals n + floor(sqrt(n) + sqrt(n+1/2)). Proof: floor(2*sqrt(n)) is the largest k such that k^2/4 <= n, while floor(sqrt(n) + sqrt(n+1/2)) is the largest k such that (k^2 - 1)/4 + 1/(16*k^2) <= n. All perfect squares are 0 or 1 (mod 4). In either case, it is easily verified that one of the inequalities is satisfied if and only if the other inequality is satisfied. - Nathaniel Johnston, Jun 26 2011

Crossrefs

Cf. A179272.

Programs

  • Magma
    [n+Floor(2*Sqrt(n)): n in [1..100]]; // Vincenzo Librandi, Dec 09 2015
  • Maple
    seq(n+floor(2*sqrt(n)), n=1..67); # Nathaniel Johnston, Jun 26 2011
  • Mathematica
    a=4; b=0;
    Table[n+Floor[(a*n+b)^(1/2)],{n,100}]
    Table[n-1+Ceiling[(n*n-b)/a],{n,70}]
  • PARI
    a(n) =  n+sqrtint(4*n); \\ Michel Marcus, Dec 08 2015, Jul 28 2025
    

A184674 a(n) = n+floor((n/2-1/(2*n))^2); complement of A184675.

Original entry on oeis.org

1, 2, 4, 7, 10, 14, 18, 23, 28, 34, 40, 47, 54, 62, 70, 79, 88, 98, 108, 119, 130, 142, 154, 167, 180, 194, 208, 223, 238, 254, 270, 287, 304, 322, 340, 359, 378, 398, 418, 439, 460, 482, 504, 527, 550, 574, 598, 623, 648, 674, 700, 727, 754, 782, 810, 839, 868, 898, 928, 959, 990, 1022, 1054, 1087, 1120, 1154, 1188, 1223, 1258, 1294, 1330, 1367, 1404
Offset: 1

Views

Author

Clark Kimberling, Jan 19 2011

Keywords

Comments

Conjecture: a(n) = A014616(n-1). - R. J. Mathar, Jan 29 2011
The above conjecture is true. - Stefano Spezia, Apr 04 2023

Crossrefs

Programs

  • Magma
    [n+Floor((n/2-1/(2*n))^2): n in [1..80]]; // Vincenzo Librandi, Jul 10 2011
  • Maple
    A184674:=n->n+floor((n/2-1/(2*n))^2): seq(A184674(n), n=1..100); # Wesley Ivan Hurt, Feb 22 2017
  • Mathematica
    a[n_]:=n+Floor[(n/2-1/(2n))^2];
    b[n_]:=n+Floor[n^(1/2)+(n+1)^(1/2)];
    Table[a[n],{n,1,120}]   (* A184674 *)
    Table[b[n],{n,1,120}]   (* A184675 *)
    FindLinearRecurrence[Table[a[n],{n,1,120}]]
    Join[{1},LinearRecurrence[{2,0,-2,1},{2,4,7,10},72]] (* Ray Chandler, Aug 02 2015 *)

Formula

a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4) for n>=6.
G.f.: x*(x^4 - x^3 - 1)/((x + 1)*(x - 1)^3). - Álvar Ibeas, Jul 20 2021
a(n) = (2*n^2 + 8*n - 9 + (-1)^n)/8 for n > 1. - Stefano Spezia, Apr 04 2023
Showing 1-2 of 2 results.