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

%I #14 Jun 08 2023 23:10:16

%S 0,1,1,1,7,5,17,47,13,217,295,139,1909,1631,3299,13085,6487,46075,

%T 84997,7153,517135,502829,588665,3605639,2428309,9492289,24062143,

%U 5077565,118985033,149450423,88519643,985222181,808182895,1870418611

%N a(n) = minimum value of abs(2^n - 3^k).

%H Harry J. Smith, <a href="/A064024/b064024.txt">Table of n, a(n) for n = 0..500</a>

%e a(5) = 5 because |2^5 - 3^3| = 5.

%t 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} ]

%o (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

%Y Cf. A056850.

%K nonn

%O 0,5

%A _Robert G. Wilson v_, Sep 18 2001

%E Name changed by _Sean A. Irvine_, Jun 08 2023

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 April 18 04:24 EDT 2024. Contains 371767 sequences. (Running on oeis4.)