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.

A099280 2^n-th palindromic number.

Original entry on oeis.org

1, 2, 4, 8, 77, 232, 555, 2992, 15751, 41314, 92529, 1049401, 3097903, 7193917, 63855836, 227696722, 555373555, 3107337013, 16214541261, 42428982424, 94857775849, 1097153517901, 3194305034913, 7388609068837, 67772177127776
Offset: 0

Views

Author

Robert G. Wilson v, Oct 04 2004

Keywords

Crossrefs

Cf. A083816.

Programs

  • Mathematica
    NextPalindrome[n_] := Block[ {l = Floor[ Log[10, n] + 1], idn = IntegerDigits[n]}, If[ Union[ idn] == {9}, Return[n + 2], If[l < 2, Return[n + 1], If[ FromDigits[ Reverse[ Take[ idn, Ceiling[l/2]]]] FromDigits[ Take[ idn, -Ceiling[l/2]]], FromDigits[ Join[ Take[ idn, Ceiling[l/2]], Reverse[ Take[ idn, Floor[l/2]]] ]], idfhn = FromDigits[ Take[ idn, Ceiling[l/2]]] + 1; idp = FromDigits[ Join[ IntegerDigits[ idfhn], Drop[ Reverse[ IntegerDigits[ idfhn]], Mod[l, 2]]]] ]]]]; k = 1; np = 0; Do[ While[np = NextPalindrome[np]; k != 2^n, k++ ]; Print[np], {n, 26}]
  • Python
    def A099280(n):
        if n == 0: return 1
        m = 1<Chai Wah Wu, Jun 13 2024