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.

Showing 1-1 of 1 results.

A348320 Perfect powers m^k, k >= 2 of palindromes m when m^k is not a palindrome.

Original entry on oeis.org

16, 25, 27, 32, 36, 49, 64, 81, 125, 128, 216, 243, 256, 512, 625, 729, 1024, 1089, 1296, 1936, 2048, 2187, 2401, 3025, 3125, 4096, 4356, 5929, 6561, 7744, 7776, 8192, 9801, 10648, 15625, 16384, 16807, 17161, 19683, 19881, 22801, 25921, 29241, 32761, 32768, 35937, 36481, 46656
Offset: 1

Views

Author

Bernard Schott, Oct 12 2021

Keywords

Comments

Seems to be the "converse" of A348319.
When m is prime, then we get the subsequence A339624.
G. J. Simmons conjectured that there are no palindromes of form n^k for k >= 5 (and n > 1) (see Simmons link p. 98); according to this conjecture, every palindrome^k, k >= 5 is a term.

Examples

			216 = 6^3, 1936 = 44^2, 4096 = 8^4, 7776 = 6^5, 35937 = 33^3, 117649 = 7^6 are terms.
		

Crossrefs

Subsequence of A001597.

Programs

  • Mathematica
    seq[max_] := Module[{m = Floor@Sqrt[max], s = {}, n, p}, Do[If[! PalindromeQ[k], Continue[]]; n = Floor@Log[k, max]; Do[If[! PalindromeQ[(p = k^j)], AppendTo[s, p]], {j, 2, n}], {k, 2, m}]; Union[s]]; seq[50000] (* Amiram Eldar, Oct 12 2021 *)
  • PARI
    ispal(x) = my(d=digits(x)); d == Vecrev(d);
    isok(x) = my(q); ispower(x,,&q) && !ispal(x) && ispal(q); \\ Michel Marcus, Oct 14 2021
  • Python
    def ispal(n): s = str(n); return s == s[::-1]
    def aupto(limit):
        aset, m, mm = set(), 2, 4
        while mm <= limit:
            if ispal(m):
                mk = mm
                while mk <= limit:
                    if not ispal(mk): aset.add(mk)
                    mk *= m
            mm += 2*m + 1
            m += 1
        return sorted(aset)
    print(aupto(47000)) # Michael S. Branicky, Oct 12 2021
    
Showing 1-1 of 1 results.