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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A064024 a(n) = value of k such that absolute difference of 2^n and 3^k is minimized. 2
 0, 1, 1, 1, 7, 5, 17, 47, 13, 217, 295, 139, 1909, 1631, 3299, 13085, 6487, 46075, 84997, 7153, 517135, 502829, 588665, 3605639, 2428309, 9492289, 24062143, 5077565, 118985033, 149450423, 88519643, 985222181, 808182895, 1870418611 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,5 COMMENTS a(n) = minimum value of abs(2^n - 3^k). - Harry J. Smith, Sep 06 2009 LINKS Harry J. Smith, Table of n, a(n) for n = 0..500 EXAMPLE a(5) = 5 because |2^5 - 3^3| = 5. MATHEMATICA Do[ k = 0; While[ Abs[ 2^n - 3^k ] > Abs[ 2^n - 3^(k + 1) ], k++ ]; Print[ Abs[ 2^n - 3^k ]], {n, 0, 40} ] PROG (PARI) { p=t=1; for (n=0, 500, while ((a=abs(p - t)) > abs(p - 3*t), t*=3); write("b064024.txt", n, " ", a); p*=2 ) } \\ Harry J. Smith, Sep 06 2009 CROSSREFS Cf. A056850. Sequence in context: A125719 A070975 A265763 * A284085 A204138 A179118 Adjacent sequences:  A064021 A064022 A064023 * A064025 A064026 A064027 KEYWORD nonn AUTHOR Robert G. Wilson v, Sep 18 2001 STATUS approved

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

Last modified January 22 23:50 EST 2022. Contains 350504 sequences. (Running on oeis4.)