cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A194735 Number of positive integers k <= n such that {k*sqrt(2)} > {n*sqrt(2)}, where { } = fractional part.

This page as a plain text file.
%I A194735 #14 Jan 28 2018 11:05:58
%S A194735 0,0,2,1,4,2,0,5,2,8,4,0,8,3,12,6,16,9,2,14,6,19,10,1,16,6,22,11,28,
%T A194735 16,4,23,10,30,16,2,24,9,32,16,0,25,8,34,16,43,24,5,34,14,44,23,2,34,
%U A194735 12,45,22,56,32,8,44,19,56,30,4,43,16,56,28,0,42,13,56,26,70,39
%N A194735 Number of positive integers k <= n such that {k*sqrt(2)} > {n*sqrt(2)}, where { } = fractional part.
%H A194735 G. C. Greubel, <a href="/A194735/b194735.txt">Table of n, a(n) for n = 1..5000</a>
%t A194735 r = Sqrt[2]; p[x_] := FractionalPart[x];
%t A194735 u[n_, k_] := If[p[k*r] <= p[n*r], 1, 0]
%t A194735 v[n_, k_] := If[p[k*r] > p[n*r], 1, 0]
%t A194735 s[n_] := Sum[u[n, k], {k, 1, n}]
%t A194735 t[n_] := Sum[v[n, k], {k, 1, n}]
%t A194735 Table[s[n], {n, 1, 100}]   (* A054072 *)
%t A194735 Table[t[n], {n, 1, 100}]   (* A194735 *)
%Y A194735 Cf. A054072, A194738.
%K A194735 nonn
%O A194735 1,3
%A A194735 _Clark Kimberling_, Sep 02 2011