login

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

Number of k such that {-k*sqrt(6)} > {-n*sqrt(6)}, where { } = fractional part.
3

%I #6 Mar 30 2012 18:57:44

%S 0,1,0,2,0,3,0,4,0,5,10,4,10,3,10,2,10,1,10,19,8,18,6,17,4,16,2,15,0,

%T 14,28,11,26,8,24,5,22,2,20,38,16,35,12,32,8,29,4,26,0,23,46,18,42,13,

%U 38,8,34,3,30,57,24,52,18,47,12,42,6,37,0,32,64,25,58,18,52,11

%N Number of k such that {-k*sqrt(6)} > {-n*sqrt(6)}, where { } = fractional part.

%t r = -Sqrt[6]; p[x_] := FractionalPart[x];

%t u[n_, k_] := If[p[k*r] <= p[n*r], 1, 0]

%t v[n_, k_] := If[p[k*r] > p[n*r], 1, 0]

%t s[n_] := Sum[u[n, k], {k, 1, n}]

%t t[n_] := Sum[v[n, k], {k, 1, n}]

%t Table[s[n], {n, 1, 100}] (* A194748 *)

%t Table[t[n], {n, 1, 100}] (* A194749 *)

%Y Cf. A194748, A194738.

%K nonn

%O 1,4

%A _Clark Kimberling_, Sep 02 2011