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.

A079938 Greedy frac multiples of Pi: a(1)=1, Sum_{n>=1} frac(a(n)*Pi) = 1.

This page as a plain text file.
%I A079938 #26 Aug 31 2025 18:24:50
%S A079938 1,2,3,8,99,33102,66317,265381,1360120,25510582,78256779,156513558,
%T A079938 209259755,340262731,1963319607,6701487259,8664806866,13402974518,
%U A079938 20104461777,26805949036,33507436295,40208923554,46910410813
%N A079938 Greedy frac multiples of Pi: a(1)=1, Sum_{n>=1} frac(a(n)*Pi) = 1.
%C A079938 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 A079938 a(4) = 8 since frac(1x*) + frac(2*x) + frac(3*x) + frac(8*x) < 1, while frac(1*x) + frac(2*x) + frac(3*x) + frac(k*x) > 1 for all k > 3 and k < 8.
%p A079938 Digits := 100: a := []: s := 0: x := 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;
%o A079938 (PARI) first(n)=my(v=vector(n),s=1.,p=Pi-3,k); for(m=1,oo, my(t=frac(p*m)); if(t<s, s-=t; v[k++]=m; if(k==n, return(v)))) \\ _Charles R Greathouse IV_, Jul 25 2024
%Y A079938 Cf. A002486 (denominators of convergents to Pi), A079934, A079937, A079939.
%K A079938 nonn,changed
%O A079938 1,2
%A A079938 _Benoit Cloitre_ and _Paul D. Hanna_, Jan 21 2003
%E A079938 a(9) from Mark Hudson, Jan 30 2003
%E A079938 a(10)-a(23) from _Charles R Greathouse IV_, Jul 26 2024