login
A190191
a(n) = [n*u+n*v]-[n*u]-[n*v], where u=sqrt(2), v=1/u, and []=floor.
4
1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1
OFFSET
1
LINKS
MATHEMATICA
u = 2^(1/2); v = 1/u;
f[n_] := Floor[n*u + n*v] - Floor[n*u] - Floor[n*v]
t = Table[f[n], {n, 1, 120}] (* A190191 *)
Flatten[Position[t, 0]] (* A190192 *)
Flatten[Position[t, 1]] (* A190193 *)
PROG
(PARI) for(n=1, 30, print1(floor(n*(sqrt(2) + 1/sqrt(2))) - floor(n*sqrt(2)) - floor(n/sqrt(2)), ", ")) \\ G. C. Greubel, Dec 28 2017
(Magma) [Floor(n*(Sqrt(2) + 1/Sqrt(2))) - Floor(n*Sqrt(2)) - Floor(n/Sqrt(2)): n in [1..30]]; // G. C. Greubel, Dec 28 2017
CROSSREFS
Sequence in context: A055088 A266666 A068427 * A189920 A318963 A350600
KEYWORD
nonn
AUTHOR
Clark Kimberling, May 05 2011
STATUS
approved