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.

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

This page as a plain text file.
%I A194737 #9 Jun 07 2018 06:43:21
%S A194737 0,1,0,2,0,3,6,2,6,1,6,11,4,10,2,9,0,8,16,5,14,2,12,22,8,19,4,16,0,13,
%T A194737 26,8,22,3,18,33,12,28,6,23,40,16,34,9,28,2,22,42,14,35,6,28,50,19,42,
%U A194737 10,34,1,26,51,16,42,6,33,60,22,50,11,40,69,28,58,16,47,4,36
%N A194737 Number of k such that {-k*sqrt(2)} > {-n*sqrt(2)}, where { } = fractional part.
%H A194737 G. C. Greubel, <a href="/A194737/b194737.txt">Table of n, a(n) for n = 1..5000</a>
%t A194737 r = -Sqrt[2]; p[x_] := FractionalPart[x];
%t A194737 u[n_, k_] := If[p[k*r] <= p[n*r], 1, 0]
%t A194737 v[n_, k_] := If[p[k*r] > p[n*r], 1, 0]
%t A194737 s[n_] := Sum[u[n, k], {k, 1, n}]
%t A194737 t[n_] := Sum[v[n, k], {k, 1, n}]
%t A194737 Table[s[n], {n, 1, 100}]   (* A194736 *)
%t A194737 Table[t[n], {n, 1, 100}]   (* A194737 *)
%Y A194737 Cf. A194736, A194738.
%K A194737 nonn
%O A194737 1,4
%A A194737 _Clark Kimberling_, Sep 02 2011