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!)
A064024 a(n) = minimum value of abs(2^n - 3^k). 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
LINKS
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
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Sep 18 2001
EXTENSIONS
Name changed by Sean A. Irvine, Jun 08 2023
STATUS
approved

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 19 04:26 EDT 2024. Contains 370952 sequences. (Running on oeis4.)