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.

A189463 a(n) = [3*n*r] - 3*[n*r], where r=sqrt(5).

Original entry on oeis.org

0, 1, 2, 2, 0, 1, 1, 2, 0, 1, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 2, 0, 1, 1, 2, 0, 1, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 2, 0, 1, 2, 2, 0, 1, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 2, 0, 1, 2, 2, 0, 1, 1, 2, 0, 1, 1, 2, 0, 0, 1, 2, 2, 0, 1, 2, 2, 0, 1, 1, 2, 0, 1, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 2, 0, 1, 1, 2, 0, 1, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 2, 0, 1, 2, 2, 0, 1, 1, 2
Offset: 1

Views

Author

Clark Kimberling, Apr 22 2011

Keywords

Crossrefs

Programs

  • Magma
    [Floor(3*n*Sqrt(5)) - 3*Floor(n*Sqrt(5)): n in [1..30]]; // G. C. Greubel, Dec 28 2017
  • Mathematica
    r = 5^(1/2);
    f[n_] := Floor[3 n*r] - 3*Floor[n*r];
    t = Table[f[n], {n, 1, 220}] (* A189463 *)
    Flatten[Position[t, 0]]   (* A189464 *)
    Flatten[Position[t, 1]]   (* A189465 *)
    Flatten[Position[t, 2]]   (* A190158 *)
  • PARI
    for(n=1,30, print1(floor(3*n*sqrt(5)) - 3*floor(n*sqrt(5)), ", ")) \\ G. C. Greubel, Dec 28 2017