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.

A184676 a(n) = n + floor((n/2-1/(4*n))^2); complement of A183867.

Original entry on oeis.org

1, 2, 5, 7, 11, 14, 19, 23, 29, 34, 41, 47, 55, 62, 71, 79, 89, 98, 109, 119, 131, 142, 155, 167, 181, 194, 209, 223, 239, 254, 271, 287, 305, 322, 341, 359, 379, 398, 419, 439, 461, 482, 505, 527, 551, 574, 599, 623, 649, 674, 701, 727, 755, 782, 811, 839
Offset: 1

Views

Author

Clark Kimberling, Jan 19 2011

Keywords

Comments

a(n) is also the number of trees with n vertices with diameter (n-3). - Erich Friedman, Apr 06 2017

Crossrefs

Programs

  • Magma
    [n+Floor((n/2-1/(4*n))^2): n in [1..60]]; // Vincenzo Librandi, Dec 09 2015
  • Maple
    seq(n+floor((n/2-1/(4*n))^2), n=1..56); # Nathaniel Johnston, Jun 26 2011
  • Mathematica
    a[n_]:=n+Floor[(n/2-1/(4n))^2];
    b[n_]:=n+Floor[n^(1/2)+(n+1/2)^(1/2)];
    Table[a[n],{n,1,120}]   (* A184676 *)
    Table[b[n],{n,1,120}]   (* A183867 *)
    FindLinearRecurrence[Table[a[n],{n,1,120}]]
    LinearRecurrence[{2,0,-2,1},{1,2,5,7},56] (* Ray Chandler, Aug 02 2015 *)
    Table[n + Floor[(n/2 - 1/(4 n))^2], {n, 60}] (* Vincenzo Librandi, Dec 09 2015 *)
    Table[Ceiling[n/2] (2 + Ceiling[n/2] - Mod[n, 2]) - 1, {n, 1, 56}] (* Fred Daniel Kline, Jun 24 2016 *)
  • PARI
    a(n) = n+floor((n/2-1/(4*n))^2); \\ Michel Marcus, Dec 09 2015
    

Formula

a(n) = n+floor((n/2-1/(4*n))^2).
a(n) = A198442(n+2)-1. - Fred Daniel Kline, Jun 24 2016
G.f.: x*(1 + x^2 - x^3)/((1 - x)^3*(1 + x)). - Ilya Gutkovskiy, Jun 24 2016

A184624 a(n) = floor(n*r +h), where r=sqrt(2), h=-1/4; complement of A184619.

Original entry on oeis.org

1, 2, 3, 5, 6, 8, 9, 11, 12, 13, 15, 16, 18, 19, 20, 22, 23, 25, 26, 28, 29, 30, 32, 33, 35, 36, 37, 39, 40, 42, 43, 45, 46, 47, 49, 50, 52, 53, 54, 56, 57, 59, 60, 61, 63, 64, 66, 67, 69, 70, 71, 73, 74, 76, 77, 78, 80, 81, 83, 84, 86, 87, 88, 90, 91, 93, 94, 95, 97, 98, 100, 101, 102, 104, 105, 107, 108
Offset: 1

Views

Author

Clark Kimberling, Jan 18 2011

Keywords

Crossrefs

Programs

  • Magma
    [Floor(n*Sqrt(2) - 1/4): n in [1..100]]; // G. C. Greubel, Apr 20 2018
  • Mathematica
    r=2^(1/2); h=-1/4; s=r/(r-1);
    Table[Floor[n*r+h],{n,1,120}]  (* A184624 *)
    Table[Floor[n*s+h-h*s],{n,1,120}]  (* A184625 *)
  • PARI
    for(n=1, 100, print1(floor(n*sqrt(2) - 1/4), ", ")) \\ G. C. Greubel, Apr 20 2018
    
Showing 1-2 of 2 results.