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.

A054072 Position of n in the permutation of 1,2,...,n obtained by ordering the fractional parts {h*sqrt(2)} for h=1,2,...,n.

This page as a plain text file.
%I A054072 #12 Jan 28 2018 11:04:30
%S A054072 1,2,1,3,1,4,7,3,7,2,7,12,5,11,3,10,1,9,17,6,15,3,13,23,9,20,5,17,1,
%T A054072 14,27,9,23,4,19,34,13,29,7,24,41,17,35,10,29,3,23,43,15,36,7,29,51,
%U A054072 20,43,11,35,2,27,52,17,43,7,34,61,23,51,12,41
%N A054072 Position of n in the permutation of 1,2,...,n obtained by ordering the fractional parts {h*sqrt(2)} for h=1,2,...,n.
%H A054072 G. C. Greubel, <a href="/A054072/b054072.txt">Table of n, a(n) for n = 1..5000</a>
%t A054072 r = Sqrt[2]; p[x_] := FractionalPart[x];
%t A054072 u[n_, k_] := If[p[k*r] <= p[n*r], 1, 0]
%t A054072 v[n_, k_] := If[p[k*r] > p[n*r], 1, 0]
%t A054072 s[n_] := Sum[u[n, k], {k, 1, n}]
%t A054072 t[n_] := Sum[v[n, k], {k, 1, n}]
%t A054072 Table[s[n], {n, 1, 100}]   (* this sequence *)
%t A054072 Table[t[n], {n, 1, 100}]   (* A194735 *)
%Y A054072 Cf. A194735, A194738, A019587.
%K A054072 nonn
%O A054072 1,2
%A A054072 _Clark Kimberling_