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!)
A080142 Greedy frac multiples of 1/Pi: a(1)=1, sum(n>0,frac(a(n)*x))=1 at x=1/Pi, where "frac(y)" denotes the fractional part of y. 3

%I #5 Mar 28 2015 22:25:22

%S 1,2,22,44,66,88,110,355,710,1065,1420,1775,2130,2485,2840,3195,3550,

%T 3905,4260,4615,4970,5325,5680,6035,6390,6745,7100,7455,7810,8165,

%U 104348,104703,105058,105413,105768,208696,209051,312689,313044,417037

%N Greedy frac multiples of 1/Pi: a(1)=1, sum(n>0,frac(a(n)*x))=1 at x=1/Pi, where "frac(y)" denotes the fractional part of y.

%C The n-th greedy frac multiple of x is the smallest integer that does not cause sum(k=1..n,frac(a(k)*x)) to exceed unity; an infinite number of terms appear as the denominators of the convergents to the continued fraction of x.

%e a(3) = 22 since frac(1x) + frac(2x) + frac(22x) < 1, while frac(1x) + frac(2x) + frac(k*x) > 1 for all k>2 and k<22.

%p Digits := 1000: a := []: s := 0: x := evalf(1.0/Pi): for n from 1 to 10000000 do: temp := evalf(s+frac(n*x)): if (temp<1.0) then a := [op(a),n]: print(n): s := s+evalf(frac(n*x)): fi: od: a;

%t a[1] = 1; a[n_] := a[n] = Block[{k = a[n - 1] + 1, fps = Plus @@ Table[FractionalPart[a[i]*Pi^-1], {i, n - 1}]}, While[fps + FractionalPart[k*Pi^-1] > 1, k++ ]; a[n] = k]; Do[ Print[ a[n]], {n, 40}] (* _Robert G. Wilson v_, Nov 03 2004 *)

%Y Cf. A079938, A079939, A079940, A079941, etc.

%K nonn

%O 1,2

%A Mark Hudson (mrmarkhudson(AT)hotmail.com), Jan 30 2003

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 March 28 15:38 EDT 2024. Contains 371254 sequences. (Running on oeis4.)