Sum-product number

Last updated

A sum-product number in a given number base is a natural number that is equal to the product of the sum of its digits and the product of its digits.

Contents

There are a finite number of sum-product numbers in any given base . In base 10, there are exactly four sum-product numbers (sequence A038369 in the OEIS ): 0, 1, 135, and 144. [1]

Definition

Let be a natural number. We define the sum-product function for base , , to be the following:

where is the number of digits in the number in base , and

is the value of each digit of the number. A natural number is a sum-product number if it is a fixed point for , which occurs if . The natural numbers 0 and 1 are trivial sum-product numbers for all , 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 , , and .

A natural number is a sociable sum-product number if it is a periodic point for , where for a positive integer , and forms a cycle of period . A sum-product number is a sociable sum-product number with , and an amicable sum-product number is a sociable sum-product number with

All natural numbers are preperiodic points for , regardless of the base. This is because for any given digit count , the minimum possible value of is and the maximum possible value of is The maximum possible digit sum is therefore and the maximum possible digit product is Thus, the sum-product function value is This suggests that or dividing both sides by , Since this means that there will be a maximum value where because of the exponential nature of and the linearity of Beyond this value , 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 making it a preperiodic point.

The number of iterations needed for to reach a fixed point is the sum-product function's persistence of , 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 Fb for specific b

All numbers are represented in base .

BaseNontrivial sum-product numbersCycles
2 (none)(none)
3 (none)2 → 11 → 2, 22 → 121 → 22
4 12(none)
5 34122 → 31 → 22
6 (none)(none)
7 22, 242, 1254, 2343, 116655, 346236, 424644
8 (none)
9 13, 281876, 724856, 748724853 → 143 → 116 → 53
10 135, 144
11 253, 419, 2189, 7634, 82974
12 128, 173, 353
13 435, A644, 268956
14 328, 544, 818C
15 2585
16 14
17 33, 3B2, 3993, 3E1E, C34D, C8A2
18 175, 2D2, 4B2
19 873, B1E, 24A8, EAH1, 1A78A, 6EC4B7
20 1D3, 14C9C, 22DCCG
21 1CC69
22 24, 366C, 6L1E, 4796G
23 7D2, J92, 25EH6
24 33DC
25 15, BD75, 1BBN8A
26 81M, JN44, 2C88G, EH888
27
28 15B
29
30 976, 85MDA
31 44, 13H, 1E5
32
33 1KS69, 54HSA
34 25Q8, 16L6W, B6CBQ
35 4U5W5
36 16, 22O

Extension to negative integers

Sum-product numbers can be extended to the negative integers by use of a signed-digit representation 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.

defsum_product(x:int,b:int)->int:"""Sum-product number."""sum_x=0product=1whilex>0:ifx%b>0:sum_x=sum_x+x%bproduct=product*(x%b)x=x//breturnsum_x*productdefsum_product_cycle(x:int,b:int)->list[int]:seen=[]whilexnotinseen:seen.append(x)x=sum_product(x,b)cycle=[]whilexnotincycle:cycle.append(x)x=sum_product(x,b)returncycle

See also

Related Research Articles

<span class="texhtml mvar" style="font-style:italic;">e</span> (mathematical constant) Constant value used in mathematics

The number e is a mathematical constant approximately equal to 2.71828 that can be characterized in many ways. It is the base of the natural logarithm function. It is the limit of as n tends to infinity, an expression that arises in the computation of compound interest. It is the value at 1 of the (natural) exponential function, commonly denoted It is also the sum of the infinite series

<span class="mw-page-title-main">Natural logarithm</span> Logarithm to the base of the mathematical constant e

The natural logarithm of a number is its logarithm to the base of the mathematical constant e, which is an irrational and transcendental number approximately equal to 2.718281828459. The natural logarithm of x is generally written as ln x, logex, or sometimes, if the base e is implicit, simply log x. Parentheses are sometimes added for clarity, giving ln(x), loge(x), or log(x). This is done particularly when the argument to the logarithm is not a single symbol, so as to prevent ambiguity.

In mathematics, the prime number theorem (PNT) describes the asymptotic distribution of the prime numbers among the positive integers. It formalizes the intuitive idea that primes become less common as they become larger by precisely quantifying the rate at which this occurs. The theorem was proved independently by Jacques Hadamard and Charles Jean de la Vallée Poussin in 1896 using ideas introduced by Bernhard Riemann.

In number theory, a Liouville number is a real number with the property that, for every positive integer , there exists a pair of integers with such that

In recreational mathematics, a repunit is a number like 11, 111, or 1111 that contains only the digit 1 — a more specific type of repdigit. The term stands for "repeated unit" and was coined in 1966 by Albert H. Beiler in his book Recreations in the Theory of Numbers.

<span class="mw-page-title-main">Divergence of the sum of the reciprocals of the primes</span> Theorem

The sum of the reciprocals of all prime numbers diverges; that is:

In mathematics, a natural number in a given number base is a -Kaprekar number if the representation of its square in that base can be split into two parts, where the second part has digits, that add up to the original number. For example, in base 10, 45 is a 2-Kaprekar number, because 45² = 2025, and 20 + 25 = 45. The numbers are named after D. R. Kaprekar.

In number theory, Kaprekar's routine is an iterative algorithm named after its inventor, Indian mathematician D. R. Kaprekar. Each iteration starts with a number, sorts the digits into descending and ascending order, and calculates the difference between the two new numbers.

Bijective numeration is any numeral system in which every non-negative integer can be represented in exactly one way using a finite string of digits. The name refers to the bijection that exists in this case between the set of non-negative integers and the set of finite strings using a finite set of symbols.

In number theory, a Dudeney number in a given number base is a natural number equal to the perfect cube of another natural number such that the digit sum of the first natural number is equal to the second. The name derives from Henry Dudeney, who noted the existence of these numbers in one of his puzzles, Root Extraction, where a professor in retirement at Colney Hatch postulates this as a general method for root extraction.

Euclid's theorem is a fundamental statement in number theory that asserts that there are infinitely many prime numbers. It was first proven by Euclid in his work Elements. There are several proofs of the theorem.

A decimal representation of a non-negative real number r is its expression as a sequence of symbols consisting of decimal digits traditionally written with a single separator:

In number theory, a narcissistic number in a given number base is a number that is the sum of its own digits each raised to the power of the number of digits.

The digital root of a natural number in a given radix is the value obtained by an iterative process of summing digits, on each iteration using the result from the previous iteration to compute a digit sum. The process continues until a single-digit number is reached. For example, in base 10, the digital root of the number 12345 is 6 because the sum of the digits in the number is 1 + 2 + 3 + 4 + 5 = 15, then the addition process is repeated again for the resulting number 15, so that the sum of 1 + 5 equals 6, which is the digital root of that number. In base 10, this is equivalent to taking the remainder upon division by 9, which allows it to be used as a divisibility rule.

In number theory, the multiplicative digital root of a natural number in a given number base is found by multiplying the digits of together, then repeating this operation until only a single-digit remains, which is called the multiplicative digital root of . The multiplicative digital root for the first few positive integers are:

In number theory, a factorion in a given number base is a natural number that equals the sum of the factorials of its digits. The name factorion was coined by the author Clifford A. Pickover.

<span class="mw-page-title-main">Anatoly Karatsuba</span> Russian mathematician (1937–2008)

Anatoly Alexeyevich Karatsuba was a Russian mathematician working in the field of analytic number theory, p-adic numbers and Dirichlet series.

In number theory, a perfect digit-to-digit invariant is a natural number in a given number base that is equal to the sum of its digits each raised to the power of itself. An example in base 10 is 3435, because . The term "Munchausen number" was coined by Dutch mathematician and software engineer Daan van Berkel in 2009, as this evokes the story of Baron Munchausen raising himself up by his own ponytail because each digit is raised to the power of itself.

In number theory and mathematical logic, a Meertens number in a given number base is a natural number that is its own Gödel number. It was named after Lambert Meertens by Richard S. Bird as a present during the celebration of his 25 years at the CWI, Amsterdam.

In number theory, a perfect digital invariant (PDI) is a number in a given number base () that is the sum of its own digits each raised to a given power ().

References

  1. Sloane, N. J. A. (ed.). "SequenceA038369(Numbers n such that n = (product of digits of n) * (sum of digits of n).)". The On-Line Encyclopedia of Integer Sequences . OEIS Foundation.