%I #10 Mar 21 2016 06:21:16
%S 2,2,2,3,3,3,5,5,7,7,7,7,11,11,13,13,13,17,17,17,17,17,17,17,17,17,17,
%T 17,17,17,17,17,17,37,37,37,41,41,43,43,43,43,43,43,43,53,53,53,53,53,
%U 53,53,53,53,53,67,67,67,67
%N Numerators of sequence of fractions of primes that minimize absolute value of difference between the fractions and 1/4.
%C For n = 2, there are two primes available for use in numerator or denominator: 2,3. The best approximation to 1/4 is 2/3. Sequence begins at n = 2.
%e For n=2, there are two primes available to approximate 1/4. The closest fraction in absolute value is 2/3. The first few approximating fractions are: 2/3, 2/5, 2/7, 3/11, 3/13,...
%o (PARI) afr(n) = {kdiff = 1; fp = primes(n); for (i=1, n, num = fp[i]; for (j=1, n, den = fp[j]; diff = abs(num/den - 1/4); if (diff <= kdiff, kdiff = diff; knum = num; kden = den;););); return(knum/kden);}
%o a(n) = numerator(afr(n)); \\ _Michel Marcus_, Jun 12 2013 & Mar 21 2016
%Y Cf. A161554 (denominators).
%K nonn,frac
%O 1,1
%A _Daniel Tisdale_, Jun 13 2009
%E More terms from _Michel Marcus_, Jun 12 2013
|