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.

A190248 a(n) = [nu+nv+nw]-[nu]-[nv]-[nw], where u=(1+sqrt(5))/2, v=u^2, w=u^3, []=floor.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, May 06 2011

Keywords

Comments

a(n) = A190440(n) - A078588(n). This follows from substituting w = 1+2u, v = 1+u, and taking 2n, n and n out of the floor functions. - Michel Dekking, Oct 21 2016

Crossrefs

Programs

  • Magma
    [Floor(2*n*(2+Sqrt(5))) - Floor(n*(1+Sqrt(5))/2) - Floor(n*(3 + Sqrt(5))/2): n in [1..30]]; // G. C. Greubel, Dec 26 2017
  • Mathematica
    u = GoldenRatio; v = u^2; w=u^3;
    f[n_] := Floor[n*u + n*v + n*w] - Floor[n*u] - Floor[n*v] - Floor[n*w]
    t = Table[f[n], {n, 1, 120}] (* A190248 *)
    Flatten[Position[t, 0]]      (* A190249 *)
    Flatten[Position[t, 1]]      (* A190250 *)
    Flatten[Position[t, 2]]      (* A190251 *)
  • PARI
    for(n=1,30, print1(floor(2*n*(2+sqrt(5))) - floor(n*(1+sqrt(5))/2) - floor(n*(3 + sqrt(5))/2) - floor(n*(2 + sqrt(5))), ", ")) \\ G. C. Greubel, Dec 26 2017
    

Formula

a(n) = [2n+4nu]-[nu]-[n+nu]-[n+2nu], where u=(1+sqrt(5))/2. - Michel Dekking, Oct 21 2016

Extensions

Name corrected by Michel Dekking, Oct 21 2016