A083115 Palindromes in A083114.
1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 22, 33, 111, 121, 131, 141, 151, 161, 171, 191, 212, 222, 313, 1111, 1221, 1331, 2112, 3113, 11111, 11211, 11311, 11411, 11511, 11711, 12121, 12221, 13131, 21112, 21212, 31113, 111111, 112211, 121121
Offset: 1
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)
Crossrefs
Cf. A083114.
Programs
-
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 *)
-
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
Formula
a(n) >> 3^n. - Charles R Greathouse IV, May 15 2013
Comments