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.

A120243 Numbers k such that {k*sqrt(2)} < 1/2, where { } = fractional part.

Original entry on oeis.org

1, 3, 5, 6, 8, 10, 13, 15, 17, 18, 20, 22, 25, 27, 29, 30, 32, 34, 35, 37, 39, 42, 44, 46, 47, 49, 51, 54, 56, 58, 59, 61, 63, 66, 68, 71, 73, 75, 76, 78, 80, 83, 85, 87, 88, 90, 92, 95, 97, 99, 100, 102, 104, 105, 107, 109, 112, 114, 116, 117, 119, 121, 124, 126, 128, 129
Offset: 1

Views

Author

Clark Kimberling, Jul 01 2006

Keywords

Comments

The complement of a is b=A120749. Is a(n) < b(n) for all n? If k is a positive integer, then is b(n) - a(n) = k for infinitely many n?

Examples

			{r} = {1.4142...} = 0.4142... < 1/2, so a(1)=1.
{2r} = 0.828... > 1/2, so b(1) = 2, where b = complement of a.
{3r} = 0.242... < 1/2, so a(2) = 3.
		

Crossrefs

Programs

  • Mathematica
    z = 150; r = Sqrt[2]; f[n_] := If[FractionalPart[n*r] < 1/2, 0, 1]
    Flatten[Position[Table[f[n], {n, 1, z}], 0]] (* A120243 *)
    Flatten[Position[Table[f[n], {n, 1, z}], 1]] (* A120749 *)

Extensions

Updated by Clark Kimberling, Sep 16 2014

A120749 Numbers k such that {k* sqrt(2)} > 1/2, where { } = fractional part.

Original entry on oeis.org

2, 4, 7, 9, 11, 12, 14, 16, 19, 21, 23, 24, 26, 28, 31, 33, 36, 38, 40, 41, 43, 45, 48, 50, 52, 53, 55, 57, 60, 62, 64, 65, 67, 69, 70, 72, 74, 77, 79, 81, 82, 84, 86, 89, 91, 93, 94, 96, 98, 101, 103, 106, 108, 110, 111, 113, 115, 118, 120, 122, 123, 125, 127, 130, 132, 134
Offset: 1

Views

Author

Clark Kimberling, Jul 01 2006

Keywords

Comments

The complement of A120749 is A120243.

Examples

			Call the present sequence b and its complement a. Then
{r} = {1.4142...} = 0.4142... < 1/2, so a(1) = 1;
{2r} = 0.828... > 1/2, so b(1) = 2;
{3r} = 0.242... < 1/2, so a(2) = 3.
		

Crossrefs

Programs

  • Mathematica
    z = 150; r = Sqrt[2]; f[n_] := If[FractionalPart[n*r] < 1/2, 0, 1]
    Flatten[Position[Table[f[n], {n, 1, z}], 0]] (* A120243 *)
    Flatten[Position[Table[f[n], {n, 1, z}], 1]] (* A120749 *)
    Select[Range[200],FractionalPart[# Sqrt[2]]>1/2&] (* Harvey P. Dale, Aug 20 2024 *)

Extensions

Updated by Clark Kimberling, Sep 16 2014

A120751 (v(1), u(1), v(2), u(2), v(3), u(3), ...), where u = A120243 and v = A120749.

Original entry on oeis.org

2, 1, 4, 3, 7, 5, 9, 6, 11, 8, 12, 10, 14, 13, 16, 15, 19, 17, 21, 18, 23, 20, 24, 22, 26, 25, 28, 27, 31, 29, 33, 30, 36, 32, 38, 34, 40, 35, 41, 37, 43, 39, 45, 42, 48, 44, 50, 46, 52, 47, 53, 49, 55, 51, 57, 54, 60, 56, 62, 58, 64, 59, 65, 61, 67, 63, 69, 66, 70, 68, 72, 71
Offset: 1

Views

Author

Clark Kimberling, Jul 01 2006

Keywords

Comments

A permutation of the positive integers.

Crossrefs

Programs

  • Mathematica
    z = 4100; r = Sqrt[2];
    f[n_] := f[n] = If[FractionalPart[n*r] < 1/2, 0, 1]
    u = Flatten[Position[Table[f[n], {n, 1, z}], 0]]; (* A120243 *)
    v = Flatten[Position[Table[f[n], {n, 1, z}], 1]]; (* A120749 *)
    w = Riffle[Take[v, z/4], Take[u, z/4]]; (* A120751 *)

Extensions

Updated by Clark Kimberling, Sep 16 2014
Showing 1-3 of 3 results.