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

A035090 Non-palindromic squares which when written backwards remain square (and still have the same number of digits).

Original entry on oeis.org

144, 169, 441, 961, 1089, 9801, 10404, 10609, 12544, 12769, 14884, 40401, 44521, 48841, 90601, 96721, 1004004, 1006009, 1022121, 1024144, 1026169, 1042441, 1044484, 1062961, 1212201, 1214404, 1216609, 1236544, 1238769, 1256641
Offset: 1

Views

Author

Patrick De Geest, Nov 15 1998

Keywords

Comments

Squares with trailing zeros not included.
Sequence is infinite, since it includes, e.g., 10^(2k) + 4*10^k + 4 for all k. - Robert Israel, Sep 20 2015

Crossrefs

Reversing a polytopal number gives a polytopal number:
cube to cube: A035123, A035124, A035125, A002781;
square to square: A161902, A035090, A033294, A106323, A106324, A002779;
square to triangular: A181412, A066702;
tetrahedral to tetrahedral: A006030;
triangular to square: A066703, A179889;
triangular to triangular: A066528, A069673, A003098, A066569.
Cf. A319388.

Programs

  • Maple
    rev:= proc(n) local L,i;
    L:= convert(n,base,10);
    add(L[-i]*10^(i-1),i=1..nops(L))
    end proc:
    filter:= proc(n) local t;
      if n mod 10 = 0 then return false fi;
      t:= rev(n);
    t <> n and issqr(t)
    end proc:
    select(filter, [seq(n^2, n=1..10^5)]); # Robert Israel, Sep 20 2015
  • Mathematica
    Select[Range[1200]^2,!PalindromeQ[#]&&IntegerLength[#]==IntegerLength[ IntegerReverse[ #]] && IntegerQ[Sqrt[IntegerReverse[#]]]&] (* Harvey P. Dale, Jul 19 2023 *)

Formula

a(n) = A035123(n)^2. - R. J. Mathar, Jan 25 2017

A002780 Numbers whose cube is a palindrome.

Original entry on oeis.org

0, 1, 2, 7, 11, 101, 111, 1001, 2201, 10001, 10101, 11011, 100001, 101101, 110011, 1000001, 1001001, 1100011, 10000001, 10011001, 10100101, 11000011, 100000001, 100010001, 100101001, 101000101, 110000011, 1000000001, 1000110001
Offset: 1

Views

Author

Keywords

Comments

a(8)=2201 is the only known non-palindromic rootnumber.
There are no further non-palindromic terms (other than 2201) up to 10^11. - Matevz Markovic, Apr 04 2011. There are none up to 10^15, by direct search. - Charles R Greathouse IV, May 16 2011
There are no non-palindromic terms in the range 10^15 to 10^20 with digits from the set {0,1,2}. - Hans Havermann, May 18 2011.
From Vladimir Shevelev, May 23 2011: (Start)
Using the table by Noe-De Geest, I noticed that all numbers {a(n)=A002780(n); 11<=a(n)<=10^17+10^16+11}, except 2201, allow a partition into 3 disjoint classes of terms of the following forms: 10^k+1, 10^(2*k)+10^k+1, and (10^u+1)*(10^v+1).
Does there exist a term a(n)>10^17+10^16+11 which is in none of these classes?
If there is no such term, then we conclude that the sum of digits of a(n) does not exceed 4 (more exactly, it is i+1 where i is the number of class).
One can prove that the sequence contains no term (other than 2201) with sum of digits = 5. (End)

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A002781 (cubes of these numbers).

Programs

  • PARI
    isok(k) = my(d=digits(k^3)); Vecrev(d) == d; \\ Michel Marcus, Aug 02 2022
    
  • Python
    def ispal(s): return s == s[::-1]
    def ok(n): return ispal(str(n**3))
    print([k for k in range(10**7) if ok(k)]) # Michael S. Branicky, Aug 02 2022

Extensions

More terms from Patrick De Geest

A135066 Primes p such that p^3 is a palindrome.

Original entry on oeis.org

2, 7, 11, 101
Offset: 1

Views

Author

Alexander Adamchuk, Nov 16 2007

Keywords

Comments

Note that all first 4 listed terms are the palindromes. Corresponding palindromic cubes a(n)^3 are listed in A135067 = {8, 343, 1331, 1030301, ...}. PrimePi[ a(n) ] = {1, 4, 5, 26, ...}.
No further terms less than 1.29 * 10^10. - Michael S. Branicky, Feb 07 2021

Examples

			a(3) = 11 because 11^3 = 1331 is a palindrome.
		

Crossrefs

Cf. A002780 (cube is a palindrome), A069748 (n and n^3 are both palindromes), A002781 (palindromic cubes), A135067 (palindromic cubes of primes).

Programs

  • Mathematica
    Do[ p = Prime[n]; f = p^3; If[ f == FromDigits[ Reverse[ IntegerDigits[ f ] ] ], Print[ {n, p, f} ]], {n, 1, 200000} ]
  • Python
    from sympy import nextprime
    def ispal(n): s = str(n); return s == s[::-1]
    p = 2
    while True:
      if ispal(p**3): print(p)
      p = nextprime(p) # Michael S. Branicky, Feb 07 2021

Formula

a(n) = A135067(n)^(1/3).

A135067 Palindromic cubes p^3, where p is a prime.

Original entry on oeis.org

8, 343, 1331, 1030301
Offset: 1

Views

Author

Alexander Adamchuk, Nov 16 2007

Keywords

Comments

Corresponding primes p such that a(n) = p^3 are listed in A135066 = {2, 7, 11, 101, ...} = Primes p such that p^3 is a palindrome. PrimePi[ a(n)^(1/3) ] = {1, 4, 5, 26, ...}.
No further terms up to the 100,000th prime. - Harvey P. Dale, Jan 26 2021

Examples

			a(3) = 1331 because 11^3 = 1331 is a palindrome and 11 is a prime.
		

Crossrefs

Cf. A002780 = Cube is a palindrome. Cf. A069748 = Numbers n such that n and n^3 are both palindromes. Cf. A002781 = Palindromic cubes. Cf. A135066 = Primes p such that p^3 is a palindrome.

Programs

  • Mathematica
    Do[ p = Prime[n]; f = p^3; If[ f == FromDigits[ Reverse[ IntegerDigits[ f ] ] ], Print[ {n, p, f} ]], {n, 1, 200000} ]
    Select[Prime[Range[200]]^3,PalindromeQ] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jan 26 2021 *)

Formula

a(n) = A135066(n)^3.

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
    

A087988 Palindromic numbers whose squares and cubes are equally palindromic.

Original entry on oeis.org

0, 1, 2, 11, 101, 111, 1001, 10001, 10101, 11011, 100001, 101101, 110011, 1000001, 1001001, 1100011, 10000001, 10011001, 10100101, 11000011, 100000001, 100010001, 100101001, 101000101, 110000011, 1000000001, 1000110001
Offset: 1

Views

Author

Labos Elemer, Oct 01 2003

Keywords

Comments

Numbers n such that n, n^2 and n^3 are all palindromes.
Essentially A002780 with two terms removed, 7 and 2201.

Examples

			11^2=121, 11^3=1331.
		

Crossrefs

Intersection of A002113, A002778 and A002780.

Programs

  • Maple
    rev:=proc(a) local aa,ct: aa:=convert(a,base,10): ct:=nops(aa): add(10^(ct-j)*aa[j],j=1..ct) end: p:=proc(n) if rev(n)=n and rev(n^2)=n^2 and rev(n^3)=n^3 then n else fi end: seq(p(n),n=0..12*10^5); # Emeric Deutsch, May 01 2005
  • PARI
    ispal(n) = my(d = digits(n)); Vecrev(d) == d;
    isok(n) = ispal(n) && ispal(n^2) && ispal(n^3); \\ Michel Marcus, Oct 25 2015

Extensions

More terms from Ray Chandler, Oct 05 2003
Edited by N. J. A. Sloane, Aug 29 2008 at the suggestion of R. J. Mathar
Showing 1-6 of 6 results.