It's Totally Totative!

Define a positive integer n n to be totatively prime if the set of all positive integers less than n n that are relatively prime to n n contains no composite numbers. What is the largest totatively prime number?

For example, 9 is not totatively prime because 4 is less than 9 and is relatively prime to 9, but 4 is composite.


The answer is 30.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

4 solutions

David Venhoek
Oct 30, 2017

Solution

Let us start with a simple observation: If n is totatively prime and n > 4 n > 4 , then n n is even. This is true because the only way to make gcd ( 4 , n ) \gcd(4,n) different from 1 1 is to have n n be even. Using the same logic, n > 9 n>9 implies that n n can be divided by 3 3 , and in general, if n > p 2 n > p^2 for some prime p p , then p p divides n n .

From this, we thus conclude that if n > p 2 n > p^2 for some p, then n is a multiple of the product of all primes smaller than or equal to p. Let us make a table from this:

p p 2 p^2 product of primes p \le p
2 4 2
3 9 6
5 25 30
7 49 210
11 121 2310

Note that, when n > 49 n > 49 , n n has to be a multiple of 210 210 . But this is itself bigger than 1 1 2 11^2 , hence it would have to be a multiple of 2310 2310 , which is bigger than 1 3 2 13^2 , and so on. We can prove (using lemma below), that if $n>49$, then $n$ is bigger than the square of any prime. There is of course no natural number for which that holds, so n 49 n \le 49 .

Using the table, consider the case n > 25 n>25 . Then n n has to be a multiple of 30 30 , and there is only one such multiple below 49 49 , 30 30 itself. Since any composite number below 30 30 has a factor 5 \le 5 , no composite number below 30 30 is coprime to 30 30 , hence 30 30 is totatively prime. Since no number larger than it can be totatively prime, it follows that 30 30 is the largest totatively prime number.

Proof of lemma

We need to show that, if p 7 p\ge 7 , then q < p q > p 2 \prod_{q<p} q > p^2 .

Let p k p_k denote the $k$-th prime. The theorem holds for k = 4 k=4 , as seen in the table above. Suppose it holds for p k p_k with k 4 k\ge 4 , then by Bertrand's postulate p k + 1 2 p k p_{k+1} \le 2p_k . It then follows that q < p k + 1 q > 4 q < p k q > 4 p k 2 p k + 1 2 \prod_{q<p_{k+1}} q > 4\prod_{q<p_k} q > 4p_k^2 \ge p_{k+1}^2 . Hence, it also follows for p k + 1 p_{k+1} . From induction, the lemma follows.

Moderator note:

The term generally used in mathematics for this type of number is a very round number . It's this sequence in the On-line Encyclopedia of Integer Sequences.

1 , 2 , 3 , 4 , 6 , 8 , 12 , 18 , 24 , 30 1, 2, 3, 4, 6, 8, 12, 18, 24, 30

The fact 30 is the largest of this sequence was first proven in 1893 by the Ukranian mathematician Samuil Osipovich Shatunovsky .

I did a very similar solution, but instead of your lemma I noticed the exponential asymptotic behavior of the primorial function (product of primes), whose deduction follows from Chebyshev's theta's asymptotic bounds (which are easy too). So that's an alternative.

Eduardo Gomes Bonilha Gonçalves - 3 years, 7 months ago

I noticed this result many years back, but wasn't able to prove it without computer verification of smaller cases. Thank you for the argument!

Jason Martin - 3 years, 7 months ago
Alex Suarez-Beard
Oct 19, 2017

Let S C N C ( n ) SCNC(n) denote the Smallest (positive) Composite Number that is Coprime to n n . We note that n n being totatively prime is equivalent to S C N C ( n ) > n SCNC(n)>n . So it begs the question, what would S C N C ( n ) SCNC(n) be?

First, let P ( n ) P(n) be the set of primes that don't divide n n ; it is clear that the prime factorization of S C N C ( n ) SCNC(n) must consist of powers of primes that lie P ( n ) P(n) . Let p p_* be the smallest element of P ( n ) P(n) . If there exists q > p q > p_* such that q q divides S C N C ( n ) SCNC(n) , then we notice that S C N C ( n ) p q \frac{SCNC(n)*p_*}{q} is another composite number coprime to n n , and it is smaller than S C N C ( n ) SCNC(n) , which is a contradiction. So S C N C ( n ) SCNC(n) must be a prime power of p p_* ; in particular, it must be the smallest composite power of p p_* , which is p 2 p_*^2 .

Next, let T T be the set of all totatively prime numbers, and for a prime number p p , let T p : = { n N : S C N C ( n ) = p 2 > n } T_p := \{n \in \mathbb{N}: SCNC(n) = p^2 > n\} . It is clear that T p T T_p \subseteq T , and it is also clear that any element of T T belongs to T p T_p for some prime p p . One more observation: for any m T p m \in T_p , p p must be the smallest prime that doesn't divide m m ; this implies that m m is divisible by every prime less than p p , and is thus divisible by the product of such primes. This fact allows us to quickly identity the elements of T p T_p by simply counting up the valid multiples of the product of all primes less than p p . Below are the first few T p T_p sets:

T 2 = { 3 } T_2 = \{3\} , T 3 = { 2 , 4 , 8 } T_3 = \{2,4,8\} , T 5 = { 6 , 12 , 18 , 24 } T_5 = \{6,12,18,24\} , T 7 = { 30 } T_7 = \{30\} , T 11 = T_{11} = \varnothing .

Why is T 11 T_{11} empty? Any element of T 11 T_{11} has to be a positive multiple of 2 3 5 7 = 210 2*3*5*7 = 210 , and hence greater than 210 210 . Yet, every element of T 11 T_{11} must also be less than 121 121 ; there are no numbers that satisfy these conditions. In general, if p p is the n n th prime number -- denote this as q n q_n -- and q 1 q 2 q n 1 > q n 2 q_1q_2 \cdots q_{n-1} > q_n^2 , then T q n T_{q_n} is empty. This fact, along with Bertrand's Postulate (actually a proven theorem regarding the distribution of primes), are enough to prove that beyond T 7 T_7 , all T p T_p sets are empty; this shows that 30 30 is indeed the largest totatively prime number.

Proposition : Let q k q_k be the k k th prime. Then for all k 5 k \geq 5 , q 1 q 2 q k 1 > q k 2 q_1q_2 \cdots q_{k-1} > q_k^2 (hence T q k T_{q_k} is empty for all k 5 k \geq 5 ).

Proof by induction. We've already evaluated the base case, namely that 2 3 5 7 = 210 > 121 = 1 1 2 2*3*5*7 = 210 > 121 = 11^2 . So, assume that q 1 q 2 q k 1 > q k 2 q_1q_2 \cdots q_{k-1} > q_k^2 for k 5 k \geq 5 . Then we also have that q 1 q 2 q k 1 > q k \sqrt{q_1q_2 \cdots q_{k-1}} > q_k . Thus, q 1 q 2 q k 1 q k > q k q k \sqrt{q_1q_2 \cdots q_{k-1}q_k} > q_k\sqrt{q_k} .

Here's where Bertrand's postulate comes in. The statement of Bertrand's postulate is that for any natural number n n , there exists a prime number s s satisfying n < s < 2 n n < s < 2n . In particular the set of primes S : = { s : q k < s < 2 q k } S := \{s : q_k < s < 2q_k\} is nonempty and thus has a smallest element; this smallest element can be no other than q k + 1 q_{k+1} . Since q k > 2 \sqrt{q_k}>2 whenever k 5 k \geq 5 , we have the following inequality chain:

q 1 q 2 q k > q k q k > 2 q k > q k + 1 > q k q 1 q 2 q k > q k + 1 q 1 q 2 q k > q k + 1 2 \sqrt{q_1q_2 \cdots q_k} > q_k\sqrt{q_k} > 2q_k > q_{k+1} > q_k \implies \sqrt{q_1q_2 \cdots q_k} > q_{k+1} \implies q_1q_2 \cdots q_k > q_{k+1}^2 .

With the inductive hypothesis proven, the proposition is true. Therefore, T p T_p is empty for any prime greater than 7 7 , so 30 30 is the largest totatively prime number.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
from fractions import gcd
def isprime(startnumber):
    startnumber*=1.0
    for divisor in range(2,int(startnumber**0.5)+1):
        if startnumber/divisor==int(startnumber/divisor):
            return False
    return True
start_num = 3000   #starting number
primes = [] 
for a in range(2,start_num):
    if isprime(a):
        primes.append(a)
for i in range(start_num,1,-1):
    rel_prime = [k for k in range(2,i) if gcd(k,i) == 1]
    if len(list(set(rel_prime).intersection(primes))) == len(rel_prime):
        print i
        break

Ans: 30

The best way to solve this type of problem is to rephrase the question. Since it's relative prime should not be composite, we would like our number to be not a relative prime to every composite number before it. We can do that by having a number that is a multiple of all the smaller primes, so if it's a multiple of two, all even are out as a possible relative prime. If it's a multiple of 3, the all number in the form of 3n will be out as well. Soon we'll find that in this form, the possible relative prime left are those complete power of the higher prime that isn't a part of the prime divisor of our number.

Ex. 2 3 5=30; the possible number that might counter this are numbers that are powers of the next prime like 7^2, 7^3, 11^2 etc. but so far this possibilities are all more than 30.

Let's try and move ahead and go with number 2 3 5*7=210; 11^2 is less than 210 and so this would be the composite relative prime of our number... As you move higher, the numbers that counter our number increase as well. So the least number is 30.

The revised question would then be "What is the largest number that is a multiple of consecutive primes without a power of a next higher prime that is less than the number". You can use this to intuitively get the answer.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...