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-3 of 3 results.

A184580 a(n) = floor((n-1/4)*sqrt(2)), complement of A184581.

Original entry on oeis.org

1, 2, 3, 5, 6, 8, 9, 10, 12, 13, 15, 16, 18, 19, 20, 22, 23, 25, 26, 27, 29, 30, 32, 33, 35, 36, 37, 39, 40, 42, 43, 44, 46, 47, 49, 50, 51, 53, 54, 56, 57, 59, 60, 61, 63, 64, 66, 67, 68, 70, 71, 73, 74, 76, 77, 78, 80, 81, 83, 84, 85, 87, 88, 90, 91, 92, 94, 95, 97, 98, 100, 101, 102, 104, 105, 107, 108, 109, 111, 112, 114, 115, 117, 118, 119, 121, 122, 124, 125, 126, 128, 129, 131, 132, 133, 135, 136, 138, 139, 141, 142, 143, 145, 146, 148, 149, 150, 152, 153, 155, 156, 158, 159, 160, 162, 163, 165, 166, 167, 169
Offset: 1

Views

Author

Clark Kimberling, Jan 17 2011

Keywords

Crossrefs

Cf. A184581.

Programs

  • Magma
    [Floor((n-1/4)*Sqrt(2)): n in [1..30]]; // G. C. Greubel, Jan 27 2018
  • Mathematica
    r=2^(1/2); c=1/4; s=r/(r-1);
    Table[Floor[n*r-c*r],{n,1,120}]  (* this sequence *)
    Table[Floor[n*s+c*s],{n,1,120}]  (* A184581 *)
  • PARI
    for(n=1, 30, print1(floor((n-1/4)*sqrt(2)), ", ")) \\ G. C. Greubel, Jan 27 2018
    

Formula

a(n) = floor[(n-1/4)*sqrt(2)].

Extensions

Edited by Clark Kimberling, Jun 09 2015

A258833 Nonhomogeneous Beatty sequence: ceiling((n + 1/4)*sqrt(2)).

Original entry on oeis.org

1, 2, 4, 5, 7, 8, 9, 11, 12, 14, 15, 16, 18, 19, 21, 22, 23, 25, 26, 28, 29, 31, 32, 33, 35, 36, 38, 39, 40, 42, 43, 45, 46, 48, 49, 50, 52, 53, 55, 56, 57, 59, 60, 62, 63, 64, 66, 67, 69, 70, 72, 73, 74, 76, 77, 79, 80, 81, 83, 84, 86, 87, 89, 90, 91, 93
Offset: 0

Views

Author

Clark Kimberling, Jun 12 2015

Keywords

Comments

Complement of A258834.
Let r = sqrt(2) and s = r/(r-1) = 2 + sqrt(2). Let R be the ordered set {floor[(n + 1/4)*r] : n is an integer} and let S be the ordered set {floor[(n - 1/4)*s : n is an integer}; thus,
R = (..., -8, -7, -5, -4, -2, -1, 1, 2, 3, 5, 6, ...)
S = (..., -13, -10, -6, -3, 0, 4, 7, 11, 14, ...).
By Fraenkel's theorem (Theorem XI in the cited paper); R and S partition the integers.
A184580 = (1,2,3,5,6,...), positive terms of R;
A184581 = (4,7,11,14,...), positive terms of S;
A258833 = (1,2,4,5,7,...), - (negative terms of R);
A258834 = (0,3,6,10,...), - (nonpositive terms of S).
A184580 and A184581 partition the positive integers, and A258833 and A258834 partition the nonnegative integers.

Crossrefs

Cf. A258834 (complement), A184580, A184581.

Programs

  • Magma
    [Ceiling((n + 1/4)*Sqrt(2)): n in [0..80]]; // Vincenzo Librandi, Jun 13 2015
    
  • Mathematica
    r = Sqrt[2]; s = r/(r - 1);
    Table[Ceiling[(n + 1/4) r], {n, 0, 100}] (* A258833 *)
    Table[Ceiling[(n - 1/4) s], {n, 0, 100}] (* A258834 *)
  • PARI
    for(n=0,50, print1(ceil((n + 1/4)*sqrt(2)), ", ")) \\ G. C. Greubel, Feb 08 2018

Formula

a(n) = ceiling((n + 1/4)*sqrt(2)) = floor((n + 1/4)*sqrt(2) + 1).

A258834 Nonhomogeneous Beatty sequence: a(n) = ceiling((n - 1/4)*(2 + sqrt(2))).

Original entry on oeis.org

0, 3, 6, 10, 13, 17, 20, 24, 27, 30, 34, 37, 41, 44, 47, 51, 54, 58, 61, 65, 68, 71, 75, 78, 82, 85, 88, 92, 95, 99, 102, 105, 109, 112, 116, 119, 123, 126, 129, 133, 136, 140, 143, 146, 150, 153, 157, 160, 164, 167, 170, 174, 177, 181, 184, 187, 191, 194
Offset: 0

Views

Author

Clark Kimberling, Jun 12 2015

Keywords

Comments

Complement of A258833.
See A258833 for more comments.

Crossrefs

Cf. A258833 (complement), A184580, A184581.

Programs

  • Magma
    [Ceiling((n-1/4)*(2+Sqrt(2))): n in [0..80]]; // Vincenzo Librandi, Jun 13 2015
    
  • Mathematica
    r = Sqrt[2]; s = r/(r - 1);
    Table[Ceiling[(n + 1/4) r], {n, 0, 100}] (* A258833 *)
    Table[Ceiling[(n - 1/4) s], {n, 0, 100}] (* A258834 *)
  • PARI
    vector(60, n, ceil((n-1/4)*(2+sqrt(2)))) \\ G. C. Greubel, Aug 19 2018

Formula

a(n) = ceiling((n - 1/4)*(2 + sqrt(2))) = floor((n - 1/4)*(2 + sqrt(2)) + 1).

Extensions

Corrected by Michel Dekking, Sep 19 2019
Showing 1-3 of 3 results.