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.

A355062 Perfect powers whose digits are in nondecreasing order.

Original entry on oeis.org

4, 8, 9, 16, 25, 27, 36, 49, 125, 128, 144, 169, 225, 256, 289, 1156, 1225, 1369, 1444, 4489, 6889, 11236, 11449, 13456, 13689, 27889, 33489, 111556, 112225, 113569, 134689, 146689, 344569, 444889, 2666689, 2778889, 11115556, 11122225, 11135569, 11336689
Offset: 1

Views

Author

Jon E. Schoenfield, Jun 16 2022

Keywords

Comments

I.e., numbers of the form b^k with b > 1 and k > 1 in whose base-10 expansion no digit is less than the previous digit.
Includes infinite subsequences such as {16, 1156, 111556, 11115556, ...} and {25, 1225, 112225, 11122225, ...}, so the sequence is infinite.

Crossrefs

Programs

  • Mathematica
    perfectPowerQ[n_] := GCD @@ FactorInteger[n][[All, 2]] > 1; (* A001597 *) Select[Range[10^6], perfectPowerQ[#] && Min[Differences[IntegerDigits[#]]]>-1 &] (* Stefano Spezia, Jul 01 2025 *)
  • PARI
    isok(m) = if (ispower(m), my(d=digits(m)); (d == vecsort(d))); \\ Michel Marcus, Jun 18 2022
  • Python
    from sympy import perfect_power as pp
    from itertools import count, islice, combinations_with_replacement as mc
    def agen():
        for d in count(1):
            ni = (int("".join(m)) for m in mc("123456789", d))
            yield from filter(pp, ni)
    print(list(islice(agen(), 40))) # Michael S. Branicky, Jun 16 2022