A sum-product number in a given number base b {\displaystyle b} is a natural number that is equal to the product of the sum of its digits and the product of its digits. There are a finite number of sum-product numbers in any given base b {\displaystyle b} . In base 10, there are exactly four sum-product numbers (sequence A038369 in the OEIS): 0, 1, 135, and 144.
Definition Let n {\displaystyle n} be a natural number. We define the sum-product function for base b > 1 {\displaystyle b>1} , F b : N → N {\displaystyle F_{b}:\mathbb {N} \rightarrow \mathbb {N} } , to be the following:
F b ( n ) = ( ∑ i = 1 k d i ) ( ∏ j = 1 k d j ) {\displaystyle F_{b}(n)=\left(\sum _{i=1}^{k}d_{i}\right)\!\!\left(\prod _{j=1}^{k}d_{j}\right)}
where k = ⌊ log b n ⌋ + 1 {\displaystyle k=\lfloor \log _{b}{n}\rfloor +1} is the number of digits in the number in base b {\displaystyle b} , and
d i = n mod b i + 1 − n mod b i b i {\displaystyle d_{i}={\frac {n{\bmod {b^{i+1}}}-n{\bmod {b}}^{i}}{b^{i}}}}
is the value of each digit of the number. A natural number n {\displaystyle n} is a sum-product number if it is a fixed point for F b {\displaystyle F_{b}} , which occurs if F b ( n ) = n {\displaystyle F_{b}(n)=n} . The natural numbers 0 and 1 are trivial sum-product numbers for all b {\displaystyle b} , and all other sum-product numbers are nontrivial sum-product numbers. For example, the number 144 in base 10 is a sum-product number, because 1 + 4 + 4 = 9 {\displaystyle 1+4+4=9} , 1 × 4 × 4 = 16 {\displaystyle 1\times 4\times 4=16} , and 9 × 16 = 144 {\displaystyle 9\times 16=144} . A natural number n {\displaystyle n} is a sociable sum-product number if it is a periodic point for F b {\displaystyle F_{b}} , where F b p ( n ) = n {\displaystyle F_{b}^{p}(n)=n} for a positive integer p {\displaystyle p} , and forms a cycle of period p {\displaystyle p} . A sum-product number is a sociable sum-product number with p = 1 {\displaystyle p=1} , and an amicable sum-product number is a sociable sum-product number with p = 2. {\displaystyle p=2.}
… excerpt ends here. Continue reading the full article.
