OFFSET
1,2
COMMENTS
LINKS
Charles R Greathouse IV and Chai Wah Wu, Table of n, a(n) for n = 1..2002 (n = 1..59 from Charles R Greathouse IV)
FORMULA
a(n) >> 3^n. - Charles R Greathouse IV, May 15 2013
MATHEMATICA
id[n_]:=IntegerDigits[n]; palQ[n_]:=Reverse[x=id[n]]==x; t={}; Do[If[palQ[n] && (y=Times@@id[n])>0 && palQ[Plus@@id[n]] && palQ[y], AppendTo[t, n]], {n, 125000}]; t (* Jayanta Basu, May 15 2013 *)
spQ[n_]:=Module[{idn=IntegerDigits[n]}, FreeQ[idn, 0]&&AllTrue[ {n, Total[ idn], Times@@idn}, PalindromeQ]]; Select[Range[125000], spQ] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jan 30 2021 *)
PROG
(PARI) ispal(n)=n=digits(n); for(i=1, #n\2, if(n[i]!=n[#n+1-i], return(0))); 1
is(n)=my(d=vecsort(digits(n))); d[1]&&ispal(sum(i=1, #d, d[i]))&&ispal(prod(i=1, #d, d[i]))&&ispal(n) \\ Charles R Greathouse IV, May 15 2013
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Apr 23 2003
STATUS
approved