login
A194742
Number of k such that {k*sqrt(5)} < {n*sqrt(5)}, where { } = fractional part.
3
1, 2, 3, 4, 1, 3, 5, 7, 1, 4, 7, 10, 1, 5, 9, 13, 1, 6, 11, 16, 21, 5, 11, 17, 23, 4, 11, 18, 25, 3, 11, 19, 27, 2, 11, 20, 29, 38, 9, 19, 29, 39, 7, 18, 29, 40, 5, 17, 29, 41, 3, 16, 29, 42, 55, 13, 27, 41, 55, 10, 25, 40, 55, 7, 23, 39, 55, 4, 21, 38, 55, 72, 17, 35, 53
OFFSET
1,2
MATHEMATICA
r = Sqrt[5]; 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}] (* A194742 *)
Table[t[n], {n, 1, 100}] (* A194743 *)
CROSSREFS
Sequence in context: A361258 A141063 A138223 * A159798 A294236 A280694
KEYWORD
nonn
AUTHOR
Clark Kimberling, Sep 02 2011
STATUS
approved