login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 4

%I #12 Jan 28 2018 11:04:30

%S 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 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 20,43,11,35,2,27,52,17,43,7,34,61,23,51,12,41

%N 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 G. C. Greubel, <a href="/A054072/b054072.txt">Table of n, a(n) for n = 1..5000</a>

%t r = Sqrt[2]; 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}] (* this sequence *)

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

%Y Cf. A194735, A194738, A019587.

%K nonn

%O 1,2

%A _Clark Kimberling_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 16:39 EDT 2024. Contains 371989 sequences. (Running on oeis4.)