login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A194754
Number of integers k in 1..n such that {k*Pi} < {n*Pi}, where { } = fractional part.
3
1, 2, 3, 4, 5, 6, 7, 1, 3, 5, 7, 9, 11, 13, 1, 4, 7, 10, 13, 16, 19, 1, 5, 9, 13, 17, 21, 25, 1, 6, 11, 16, 21, 26, 31, 1, 7, 13, 19, 25, 31, 37, 1, 8, 15, 22, 29, 36, 43, 1, 9, 17, 25, 33, 41, 49, 1, 10, 19, 28, 37, 46, 55, 1, 11, 21, 31, 41, 51, 61, 1, 12, 23, 34, 45, 56
OFFSET
1,2
MATHEMATICA
r = Pi; 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}] (* A194754 *)
Table[t[n], {n, 1, 100}] (* A194755 *)
CROSSREFS
Sequence in context: A055401 A053829 A033928 * A167972 A360539 A380088
KEYWORD
nonn
AUTHOR
Clark Kimberling, Sep 02 2011
EXTENSIONS
Name clarified by Jon E. Schoenfield, Apr 10 2021
STATUS
approved