OFFSET
1,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..5000
MATHEMATICA
r = Sqrt[2]; p[x_] := FractionalPart[x];
u[n_, k_] := If[p[k*r] <= p[n*r], 1, 0]
v[n_, k_] := If[p[k*r] > p[n*r], 1, 0]
s[n_] := Sum[u[n, k], {k, 1, n}]
t[n_] := Sum[v[n, k], {k, 1, n}]
Table[s[n], {n, 1, 100}] (* this sequence *)
Table[t[n], {n, 1, 100}] (* A194735 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved