Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
A083114
Numbers with nonzero digits whose sum of digits as well as product of digits is a palindrome.
3
1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 21, 22, 23, 24, 31, 32, 33, 41, 42, 51, 61, 71, 81, 111, 112, 113, 114, 115, 116, 117, 119, 121, 122, 123, 124, 131, 132, 133, 141, 142, 151, 161, 171, 191, 211, 212, 213, 214, 221, 222, 231, 241
OFFSET
1,2
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..912 (* All terms up to 10^7. *)
MATHEMATICA
id[n_]:=IntegerDigits[n]; palQ[n_]:=Reverse[x=id[n]]==x; t={}; Do[If[(y=Times@@id[n])>0 && palQ[Plus@@id[n]] && palQ[y], AppendTo[t, n]], {n, 222}]; t (* Jayanta Basu, May 15 2013 *)
Select[Range[300], FreeQ[IntegerDigits[#], 0]&&AllTrue[{Total[IntegerDigits[#]], Times@@ IntegerDigits[ #]}, PalindromeQ]&] (* Harvey P. Dale, Mar 25 2024 *)
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])) \\ Charles R Greathouse IV, May 15 2013
CROSSREFS
Cf. A083115.
Sequence in context: A167619 A020664 A055570 * A129350 A368365 A004746
KEYWORD
base,easy,nonn
AUTHOR
Amarnath Murthy, Apr 23 2003
EXTENSIONS
Corrected by Harvey P. Dale, Mar 25 2024
STATUS
approved