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).

Original entry on oeis.org

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
Offset: 0

Views

Author

Robert G. Wilson v, Sep 18 2001

Keywords

Examples

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

Crossrefs

Cf. A056850.

Programs

  • 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} ]
  • 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

Extensions

Name changed by Sean A. Irvine, Jun 08 2023