OFFSET
1,3
COMMENTS
Palindromes in the sequence A229549.
LINKS
Giovanni Resta, Table of n, a(n) for n = 1..1000
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
KEYWORD
nonn,easy,base
AUTHOR
Derek Orr, Sep 29 2013
STATUS
approved