Sum-product number
   HOME

TheInfoList



OR:

A sum-product number in a given
number base In a positional numeral system, the radix or base is the number of unique digits, including the digit zero, used to represent numbers. For example, for the decimal/denary system (the most common system in use today) the radix (base number) is t ...
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.Proof that number of sum-product numbers in any base is finite
''PlanetMath''. by Raymond Puzio
In base 10, there are exactly four sum-product numbers : 0, 1, 135, and 144.


Definition

Let n be a natural number. We define the sum-product function for base b > 1 F_ : \mathbb \rightarrow \mathbb to be the following: : F_(n) = \left(\sum_^k d_i\right)\left(\prod_^k d_j\right) where k = \lfloor \log_ \rfloor + 1 is the number of digits in the number in base b, and : d_i = \frac is the value of each digit of the number. A natural number n is a sum-product number if it is a fixed point for F_, which occurs if F_(n) = n. The natural numbers 0 and 1 are trivial sum-product numbers for all b, and all other sum-product numbers are nontrivial sum-product numbers. For example, the number 144 in
base 10 The decimal numeral system (also called the base-ten positional numeral system and denary or decanary) is the standard system for denoting integer and non-integer numbers. It is the extension to non-integer numbers of the Hindu–Arabic numer ...
is a sum-product number, because 1 + 4 + 4 = 9, (1)(4)(4) = 16, and (9)(16) = 144. A natural number n is a sociable sum-product number if it is a
periodic point In mathematics, in the study of iterated functions and dynamical systems, a periodic point of a function is a point which the system returns to after a certain number of function iterations or a certain amount of time. Iterated functions Given a ...
for F_, where F_^p(n) = n for a positive integer p, and forms a cycle of period p. A sum-product number is a sociable sum-product number with p = 1, and a amicable sum-product number is a sociable sum-product number with p = 2. All natural numbers n are preperiodic points for F_, regardless of the base. This is because for any given digit count k, the minimum possible value of n is b^ and the maximum possible value of n is b^ - 1 = \sum_^ (b - 1)^k. The maximum possible digit sum is therefore k(b - 1) and the maximum possible digit product is (b - 1)^k. Thus, the sum-product function value is F_(n) = k(b-1)^. This suggests that k(b - 1)^ \geq n \geq b^, or dividing both sides by ^, k(b - 1)^2 \geq ^. Since \frac \geq 1, this means that there will be a maximum value k where ^ \leq k(b - 1)^2, because of the
exponential Exponential may refer to any of several mathematical topics related to exponentiation, including: *Exponential function, also: **Matrix exponential, the matrix analogue to the above *Exponential decay, decrease at a rate proportional to value *Expo ...
nature of ^ and the
linearity Linearity is the property of a mathematical relationship ('' function'') that can be graphically represented as a straight line. Linearity is closely related to '' proportionality''. Examples in physics include rectilinear motion, the linear ...
of k(b - 1)^2. Beyond this value k, F_(n) \leq n always. Thus, there are a finite number of sum-product numbers, and any natural number is guaranteed to reach a periodic point or a fixed point less than b^ - 1, making it a preperiodic point. The number of iterations i needed for F_^(n) to reach a fixed point is the sum-product function's persistence of n, and undefined if it never reaches a fixed point. Any integer shown to be a sum-product number in a given base must, by definition, also be a Harshad number in that base.


Sum-product numbers and cycles of ''F''''b'' for specific ''b''

All numbers are represented in base b.


Extension to negative integers

Sum-product numbers can be extended to the negative integers by use of a
signed-digit representation In mathematical notation for numbers, a signed-digit representation is a positional numeral system with a set of signed digits used to encode the integers. Signed-digit representation can be used to accomplish fast addition of integers because ...
to represent each integer.


Programming example

The example below implements the sum-product function described in the definition above to search for sum-product numbers and cycles in
Python Python may refer to: Snakes * Pythonidae, a family of nonvenomous snakes found in Africa, Asia, and Australia ** ''Python'' (genus), a genus of Pythonidae found in Africa and Asia * Python (mythology), a mythical serpent Computing * Python (pro ...
. def sum_product(x: int, b: int) -> int: """Sum-product number.""" sum_x = 0 product = 1 while x > 0: if x % b > 0: sum_x = sum_x + x % b product = product * (x % b) x = x // b return sum_x * product def sum_product_cycle(x: int, b: int) -> list nt seen = [] while x not in seen: seen.append(x) x = sum_product(x, b) cycle = [] while x not in cycle: cycle.append(x) x = sum_product(x, b) return cycle


See also

*
Arithmetic dynamics Arithmetic dynamics is a field that amalgamates two areas of mathematics, dynamical systems and number theory. Classically, discrete dynamics refers to the study of the iteration of self-maps of the complex plane or real line. Arithmetic dynamics is ...
* Dudeney number * Factorion *
Happy number In number theory, a happy number is a number which eventually reaches 1 when replaced by the sum of the square of each digit. For instance, 13 is a happy number because 1^2+3^2=10, and 1^2+0^2=1. On the other hand, 4 is not a happy number because ...
*
Kaprekar's constant In number theory, Kaprekar's routine is an iterative algorithm that, with each iteration, takes a natural number in a given number base, creates two new numbers by sorting the digits of its number by descending and ascending order, and subtracts th ...
*
Kaprekar number In mathematics, a natural number in a given number base is a p-Kaprekar number if the representation of its square in that base can be split into two parts, where the second part has p digits, that add up to the original number. The numbers are n ...
* Meertens number *
Narcissistic number In number theory, a narcissistic number 1 F_ : \mathbb \rightarrow \mathbb to be the following: : F_(n) = \sum_^ d_i^k. where k = \lfloor \log_ \rfloor + 1 is the number of digits in the number in base b, and : d_i = \frac is the value of each d ...
* Perfect digit-to-digit invariant * Perfect digital invariant


References

{{Classes of natural numbers Arithmetic dynamics Base-dependent integer sequences