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.

A081129 Differences of Beatty sequence for cube root of 3.

Original entry on oeis.org

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

Views

Author

Benoit Cloitre, Apr 16 2003

Keywords

Crossrefs

Programs

  • Magma
    A081129:= func< n | Floor((n+1)*3^(1/3)) - Floor(n*3^(1/3)) >;
    [A081129(n): n in [0..120]]; // G. C. Greubel, Jan 15 2024
    
  • Mathematica
    Differences[Floor[Range[0,110]Surd[3,3]]] (* Harvey P. Dale, Apr 06 2022 *)
  • PARI
    a(n)=floor((n+1)*3^(1/3))-floor(n*3^(1/3))
    
  • SageMath
    def A081129(n): return floor((n+1)*3^(1/3)) - floor(n*3^(1/3))
    [A081129(n) for n in range(121)] # G. C. Greubel, Jan 15 2024

Formula

a(n) = floor((n+1)*3^(1/3)) - floor(n*3^(1/3)).