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.

A229805 Palindromes m such that m*(sum of digits of m) is also a palindrome.

Original entry on oeis.org

0, 1, 2, 3, 11, 22, 101, 111, 121, 202, 272, 353, 434, 515, 616, 888, 1001, 1111, 2002, 10001, 10101, 10201, 10901, 11011, 11111, 11711, 12521, 13331, 14141, 20002, 20702, 21512, 22322, 23132, 30503, 31313, 32123, 40304, 41114, 50105, 100001, 101101, 110011, 111111, 200002, 888888
Offset: 1

Views

Author

Derek Orr, Sep 29 2013

Keywords

Comments

Palindromes in the sequence A229549.

Examples

			888*(8+8+8) = 21312 (another palindrome). So, 888 is a member of this sequence.
		

Crossrefs

Programs

  • Mathematica
    palQ[n_]:=Module[{idn=IntegerDigits[n],idn2},idn2=IntegerDigits[ n*Total[ idn]];idn==Reverse[idn]&&idn2==Reverse[idn2]]; Select[Range[ 0,33000], palQ] (* Harvey P. Dale, May 20 2014 *)
  • PARI
    pal(n)=d=digits(n);Vecrev(d)==d
    for(n=0,10^6,s=sumdigits(n);if(pal(n)*pal(n*s),print1(n,", "))) \\ Derek Orr, Apr 05 2015
  • Python
    def pal(n):
      r = ''
      for i in str(n):
        r = i + r
      return r == str(n)
    def DS(n):
      s = 0
      for i in str(n):
        s += int(i)
      return s
    {print(n, end=', ') for n in range(10**6) if pal(n)*pal(n*DS(n))}
    ## Simplified by Derek Orr, Apr 05 2015