A081117 Differences of Beatty sequence for cube root of 2.
1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1
Offset: 0
Keywords
Programs
-
Mathematica
With[{c=Surd[2,3]},Differences[Floor[Range[0,110]c]]] (* Harvey P. Dale, Jan 30 2015 *)
-
PARI
a(n)=floor((n+1)*2^(1/3))-floor(n*2^(1/3))
Formula
a(n)=floor((n+1)*2^(1/3))-floor(n*2^(1/3))