cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A064024 #14 Jun 08 2023 23:10:16
%S A064024 0,1,1,1,7,5,17,47,13,217,295,139,1909,1631,3299,13085,6487,46075,
%T A064024 84997,7153,517135,502829,588665,3605639,2428309,9492289,24062143,
%U A064024 5077565,118985033,149450423,88519643,985222181,808182895,1870418611
%N A064024 a(n) = minimum value of abs(2^n - 3^k).
%H A064024 Harry J. Smith, <a href="/A064024/b064024.txt">Table of n, a(n) for n = 0..500</a>
%e A064024 a(5) = 5 because |2^5 - 3^3| = 5.
%t A064024 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 A064024 (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 A064024 Cf. A056850.
%K A064024 nonn
%O A064024 0,5
%A A064024 _Robert G. Wilson v_, Sep 18 2001
%E A064024 Name changed by _Sean A. Irvine_, Jun 08 2023