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.

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

This page as a plain text file.
%I A194736 #8 Jun 06 2018 16:17:42
%S A194736 1,1,3,2,5,3,1,6,3,9,5,1,9,4,13,7,17,10,3,15,7,20,11,2,17,7,23,12,29,
%T A194736 17,5,24,11,31,17,3,25,10,33,17,1,26,9,35,17,44,25,6,35,15,45,24,3,35,
%U A194736 13,46,23,57,33,9,45,20,57,31,5,44,17,57,29,1,43,14,57,27,71,40
%N A194736 Number of k such that {-k*sqrt(2)} < {-n*sqrt(2)}, where { } = fractional part.
%H A194736 G. C. Greubel, <a href="/A194736/b194736.txt">Table of n, a(n) for n = 1..5000</a>
%t A194736 r = -Sqrt[2]; p[x_] := FractionalPart[x];
%t A194736 u[n_, k_] := If[p[k*r] <= p[n*r], 1, 0]
%t A194736 v[n_, k_] := If[p[k*r] > p[n*r], 1, 0]
%t A194736 s[n_] := Sum[u[n, k], {k, 1, n}]
%t A194736 t[n_] := Sum[v[n, k], {k, 1, n}]
%t A194736 Table[s[n], {n, 1, 100}]   (* A194736 *)
%t A194736 Table[t[n], {n, 1, 100}]   (* A194737 *)
%Y A194736 Cf. A194737, A194738.
%K A194736 nonn
%O A194736 1,3
%A A194736 _Clark Kimberling_, Sep 02 2011