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.

A189457 a(n) = n+[ns/r]+[nt/r]; r=2, s=sqrt(2), t=1+sqrt(2).

Original entry on oeis.org

2, 5, 8, 10, 14, 17, 19, 22, 25, 29, 31, 34, 37, 39, 43, 46, 49, 51, 54, 58, 60, 63, 66, 68, 72, 75, 78, 80, 84, 87, 89, 92, 95, 99, 101, 104, 107, 109, 113, 116, 118, 121, 124, 128, 130, 133, 136, 138, 142, 145, 148, 150, 153, 157, 159, 162, 165, 169, 171, 174, 177, 179, 183, 186, 188, 191, 194, 198, 200, 203, 206, 208, 212, 215, 218, 220, 223, 227, 229, 232, 235, 237, 241, 244
Offset: 1

Views

Author

Clark Kimberling, Apr 22 2011

Keywords

Comments

This is one of three sequences that partition the positive integers. In general, suppose that r, s, t are positive real numbers for which the sets {i/r: i>=1}, {j/s: j>=1}, {k/t: k>=1} are pairwise disjoint. Let a(n) be the rank of n/r when all the numbers in the three sets are jointly ranked. Define b(n) and c(n) as the ranks of n/s and n/t. It is easy to prove that
a(n) = n + [ns/r] + [nt/r],
b(n) = n + [nr/s] + [nt/s],
c(n) = n + [nr/t] + [ns/t], where []=floor.
With r=2, s=sqrt(2), t=1+sqrt(2), a=A189457, b=A189458, c=A186222 (conjectured).

Crossrefs

Programs

  • Magma
    [Floor(n + Floor(n*Sqrt(2)/2) + Floor(n*(1+Sqrt(2))/2)): n in [1..120]]; // G. C. Greubel, Aug 19 2018
  • Mathematica
    r=2; s=2^(1/2); t=1+2^(1/2);
    a[n_] := n + Floor[n*s/r] + Floor[n*t/r];
    b[n_] := n + Floor[n*r/s] + Floor[n*t/s];
    c[n_] := n + Floor[n*r/t] + Floor[n*s/t];
    Table[a[n], {n, 1, 120}]  (*A189457*)
    Table[b[n], {n, 1, 120}]  (*A189458*)
    Table[c[n], {n, 1, 120}]  (*A186222, conjectured*)
  • PARI
    vector(120, n, floor(n+floor(n*sqrt(2)/2)+floor(n*(1+sqrt(2))/2))) \\ G. C. Greubel, Aug 19 2018