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-4 of 4 results.

A056810 Numbers whose fourth power is a palindrome.

Original entry on oeis.org

0, 1, 11, 101, 1001, 10001, 100001, 1000001, 10000001, 100000001, 1000000001, 10000000001, 100000000001
Offset: 1

Views

Author

Robert G. Wilson v, Aug 21 2000

Keywords

Comments

Suppose a number is of the form a=10...01 (see A000533) then a^2=10..020..01, so a^2 is always a palindrome. a^3=10..030..030..01, so a^3 is always a palindrome. Similarly we also have a^4=10..040..060..040..01, so a^4 is always a palindrome. However, a^5 is in general not a palindrome, for example 101^5=10510100501. - Dmitry Kamenetsky, Apr 17 2009
The sequence contains no term with digit sum 3. - Vladimir Shevelev, May 23 2011. Proof: There are four possibilities for n:
1) 1+10^k+10^m, 00, 3) 2+10^s, s>0, 4) 3*10^t, t>=0.
In the last two cases n^4 is trivially not a palindrome.
For r>=2, in the second case we have n^4 = (1 + 2*10^r)^4 = 1 + 8*10^r + 4*10^(2*r) + 2*10^(2*r + 1) + 2*10^(3*r) + 3*10^(3*r + 1) + 6*10^(4*r) + 10^(4*r + 1)
which cannot be a palindrome.
If r=1, we have 1+8*10+...9*10^4+10^5 which also is not a palindrome.
The proof for the first case is similar. QED - Vladimir Shevelev, Oct 24 2015
Does every term have the structure 100...0001? Referring to the Simmons (1972) paper, we can also ask, if n is a number whose cube is a palindrome in base 4, must the base-4 expansion of n have the form 100...0001? - N. J. A. Sloane, Oct 22 2015

Crossrefs

Cf. A186080.

Programs

  • Mathematica
    palQ[n_] := Block[{}, Reverse[idn = IntegerDigits@ n] == idn]; k = 0; lst = {}; While[k < 1000000002, If[ palQ[k^4], AppendTo[lst, k]]; k++]; lst (* Robert G. Wilson v, Oct 23 2015 *)
  • Python
    def ispal(n): s = str(n); return s == s[::-1]
    def afind(limit):
        for k in range(limit+1):
            if ispal(k**4): print(k, end=", ")
    afind(10000001) # Michael S. Branicky, Sep 05 2021

Extensions

a(11) from Robert G. Wilson v, Oct 23 2015
a(12)-a(13) from Michael S. Branicky, Sep 05 2021

A002108 4th powers written backwards.

Original entry on oeis.org

1, 61, 18, 652, 526, 6921, 1042, 6904, 1656, 1, 14641, 63702, 16582, 61483, 52605, 63556, 12538, 679401, 123031, 61, 184491, 652432, 148972, 677133, 526093, 679654, 144135, 656416, 182707, 18, 125329, 6758401, 1295811, 6336331, 5260051, 6169761
Offset: 1

Views

Author

Keywords

Crossrefs

{This sequence} Intersection A000583 = A186080 (palindromes).

Programs

  • Mathematica
    FromDigits[Reverse[IntegerDigits[#]]]&/@(Range[40]^4) (* Harvey P. Dale, May 03 2012 *)
  • PARI
    a(n) = fromdigits(Vecrev(digits(n^4))); \\ Michel Marcus, Jun 04 2019

Formula

From Michel Marcus, Jun 04 2019: (Start)
a(n) = A004086(A000583(n)).
a(n) = A002942(n^2). (End)
a(n * 10^k) = a(n) for k >= 1. - Bernard Schott, Jun 04 2019

A348429 Perfect powers m^k, m >= 1, k >= 2 such that m and m^k both are palindromes.

Original entry on oeis.org

1, 4, 8, 9, 121, 343, 484, 1331, 10201, 12321, 14641, 40804, 44944, 1002001, 1030301, 1234321, 1367631, 4008004, 100020001, 102030201, 104060401, 121242121, 123454321, 125686521, 400080004, 404090404, 1003003001, 10000200001, 10221412201, 12102420121, 12345654321, 40000800004
Offset: 1

Views

Author

Bernard Schott, Oct 18 2021

Keywords

Comments

Complement of A348319 relative to the positive perfect powers A001597.
This sequence is infinite since each square (10^m+1)^2 is a term for m >= 0 and A033934 is a subsequence.
Observation: terms always contain an odd number of digits.
For k = 2, subsequence of palindromes whose square root is a palindrome is A057136 (see A057135).
For k = 3, except for 2201^3 = 10662526601, all known palindromic cubes have a palindromic rootnumber (see A002780 and A002781).
For k = 4, all known integers whose fourth power is a palindrome are also palindromes (see A056810 and subsequence A186080).
For k >= 5, G. J. Simmons conjectured there are no palindromes of the form m^k for k >= 5 and m > 1 (see Simmons link p. 98); according to this conjecture, all the terms are of the form (palindrome)^k, with 2 <= k <= 4.

Examples

			First few terms are equal to 1, 2^2, 2^3, 3^2, 11^2, 7^3, 22^2, 11^3, 101^2, 111^2, 11^4 = 121^2, 202^2, 212^2, 1001^2, 101^3, 1111^2, 111^3.
		

Crossrefs

Programs

  • Mathematica
    Block[{n = 10^6, nn, s}, s = Select[Range[2, n], PalindromeQ]; nn = Max[s]^2; {1}~Join~Union@ Reap[Table[Do[If[PalindromeQ[m^k], Sow[m^k]], {k, 2, Log[m, nn]}], {m, s}]][[-1, -1]]] (* Michael De Vlieger, Oct 18 2021 *)
  • PARI
    ispal(x) = my(d=digits(x)); d == Vecrev(d); \\ A002113
    isok(m) = if (m==1, return (1)); my(p); ispal(m) && ispower(m, , &p) && ispal(p); \\ Michel Marcus, Oct 19 2021
    
  • PARI
    ispal(x) = my(d=digits(x)); d == Vecrev(d); \\ A002113
    lista(nn) = {my(list = List(1)); for (k=2, sqrtint(nn), if (ispal(k), my(q = k^2); until (q > nn, if (ispal(q), listput(list, q)); q *= k;););); vecsort(list,,8);} \\ Michel Marcus, Oct 20 2021
  • Python
    # see link for faster version
    def ispal(n): s = str(n); return s == s[::-1]
    def aupto(limit):
        aset, m, mm = {1}, 2, 4
        while mm <= limit:
            if ispal(m):
                mk = mm
                while mk <= limit:
                    if ispal(mk): aset.add(mk)
                    mk *= m
            mm += 2*m + 1
            m += 1
        return sorted(aset)
    print(aupto(10**11)) # Michael S. Branicky, Oct 18 2021
    

A265449 Palindromes that are the sums of consecutive fourth powers.

Original entry on oeis.org

0, 1, 353, 979, 14641, 16561, 998899, 2138312, 104060401, 1004006004001, 10004000600040001, 85045192129154058, 100004000060000400001, 1000004000006000004000001, 10000004000000600000040000001
Offset: 1

Views

Author

Chai Wah Wu, Jan 29 2016

Keywords

Comments

Subsequence of A217844 and supersequence of A186080.

Examples

			353 = 2^4 + 3^4 + 4^4
979 = 1^4 + 2^4 + 3^4 + 4^4 + 5^4
16561 = 9^4 + 10^4
998899 = 19^4 +...+ 23^4
2138312 = 10^4 +...+ 25^4
85045192129154058 = 5582^4 +...+ 5666^4
		

Crossrefs

Programs

  • Python
    import heapq
    def ispal(n): s = str(n); return s == s[::-1]
    def afind():
      print("0, ") # special case
      N, T = 4, 1  # power, min number of terms
      sigma = sum(i**N for i in range(1, T+1))
      h = [(sigma, 1, T)]
      nextcount = T + 1
      while True:
        (v, s, l) = heapq.heappop(h)
        if ispal(v): print(f"{v}, [= Sum_{{i = {s}..{l}}} i^{N}]")
        if v >= sigma:
          sigma += nextcount**N
          heapq.heappush(h, (sigma, 1, nextcount))
          nextcount += 1
        v -= s**N; s += 1; l += 1; v += l**N
        heapq.heappush(h, (v, s, l))
    afind() # Michael S. Branicky, May 16 2021 after Bert Dobbelaere in A344338

Extensions

a(13)-a(15) from Giovanni Resta, Aug 27 2019
Showing 1-4 of 4 results.