OFFSET
0,5
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
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Sep 18 2001
EXTENSIONS
Name changed by Sean A. Irvine, Jun 08 2023
STATUS
approved