OFFSET
1,3
LINKS
Delbert L. Johnson, Table of n, a(n) for n = 1..20000
EXAMPLE
829*(8+2+9) = 15751 (palindrome), so 829 is a term of this sequence.
MATHEMATICA
palQ[n_] := Block[{d = IntegerDigits@ n}, d == Reverse@ d]; Select[Range@ 10000, palQ[# Plus @@ IntegerDigits@ #] &] (* Michael De Vlieger, Apr 12 2015 *)
PROG
(Python)
def ispal(n):
r = ''
for i in str(n):
r = i + r
return n == int(r)
def DS(n):
s = 0
for i in str(n):
s += int(i)
return s
{print(n, end=', ') for n in range(10**4) if ispal(n*DS(n))}
## Simplified by Derek Orr, Apr 10 2015
(PARI) ispal(n)=d=digits(n); d==Vecrev(d)
for(n=0, 10^4, s=sumdigits(n); if(ispal(n*s), print1(n, ", "))) \\ Derek Orr, Apr 10 2015
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Derek Orr, Sep 26 2013
EXTENSIONS
More terms from Derek Orr, Apr 10 2015
STATUS
approved