login
A229805
Palindromes m such that m*(sum of digits of m) is also a palindrome.
1
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,3
COMMENTS
Palindromes in the sequence A229549.
LINKS
EXAMPLE
888*(8+8+8) = 21312 (another palindrome). So, 888 is a member of this sequence.
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 *)
PROG
(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
(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
CROSSREFS
Sequence in context: A229804 A241096 A057135 * A104075 A339753 A236168
KEYWORD
nonn,easy,base
AUTHOR
Derek Orr, Sep 29 2013
STATUS
approved