2

I saw a problem from KMO(Korean Math Olympiad). The problem states:

$21^{9508} + 21^5 + 1$ is a product of two primes. Find the smaller one.

I couldn't solve it, so I saw the answer. It was $463 = 21^2 + 21 + 1$. Now I got the factorization

$21^{9508} + 21^5 + 1 = (21^2 + 21 + 1)(21^{9506} - 21^{9505} + 21^{9503} - 21^{9502} + \cdots + 21^2 - 21) + (21^2 + 21 + 1)(21^3 - 21^2 + 1).$

But how can I know $\frac{21^{9508} + 21^5 + 1}{463}$ is a prime? I really have no idea...

Edit:

The original problem does not say there is an assumption, so I believed the primality of this number.

Definitely there is no known general algorithm to test the primality of such a large number in some "reasonable" time (and space).

So is there any briliant way to prove this is a prime or do we just have to believe this is a prime (so that the question might be erroneous)?

Calmadeas
  • 129
  • 1
    Do you mean $2^{9508}$ or $21^{9508}$? – Ho-Oh Aug 18 '22 at 06:09
  • 1
    @Ho-Oh It would have to be $21^{9508}$...If it was $2^{9508}$ then the numerator would be even while $(463 \cdot p)$ would clearly be odd for all $p\not =2$. – Volk Aug 18 '22 at 06:22
  • 1
    This is probably $21$ instead of $2$. Once that is done, a standard cube root of unity argument shows that $x^2+x+1$ divides $x^{9508}+x^5+1$ (as integer-coefficient polynomials), and $463=21^2+21+1$. That $463$ is the answer comes from the fact that the number is a product of two primes. I can post this as an answer , except : this is probably a duplicate? – Sarvesh Ravichandran Iyer Aug 18 '22 at 06:27
  • By here in the 1st dupe: $\ a^2+a+1\mid a^{\large 1+3j}+a^{\large 2+3k}+1$ Op is special case $,a = 21.,$ More generally see the method of simpler multiples in the 2nd dupe. – Bill Dubuque Aug 18 '22 at 07:34
  • 2
    The problem does not require you to prove that the cofactor of $463$ is prime (but that is implied by the hypothesis of the problem). – Bill Dubuque Aug 18 '22 at 07:42
  • @Ho-Oh It should be 21. Sorry for the confusion. – Calmadeas Aug 18 '22 at 07:48
  • 1
    "Definitely there is no known general algorithm to test the primality of such a large number in some "reasonable" time (and space)." This is not true. The elliptic curve primality proving method (ECPP) can prove general numbers of this magnitude (about $12\ 500$ digits) to be prime. This will take quite a while, but it will take at most a few days (maybe it can even be done much faster). Of course, we cannot prove the primality of such numbers by hand, but for the exercise , we can rely on the statement that the given number is a semiprime. – Peter Aug 22 '22 at 14:08

2 Answers2

3

You use a primality profing algorithm. In some cases they give you a primality certificate, that can be checked fast on a computer.

I do not see an easy way to know that this number is prime.

On the other side: the original KMO problem did not ask to show that the original number had only two prime factors. It advised to assume that it was like that and produce the smaller of the factors.

Thomas Preu
  • 2,002
0

We can iterate larger & larger values as follows (base21)

10010001 / 111     (gives remainder)     ie 21^8 +21^5+21^0
100010001 / 111     (gives remainder)    ie 21^9 +21^5+21^0
1000010001 / 111  yields  K00K0KK1       ie 21^10 +21^5+21^0
10000010001 / 111     (gives remainder)    etc
100000010001 / 111     (gives remainder)
1000000010001 / 111  yields K00K00K0KK1       ie 21^13 +21^5+21^0
10000000010001 / 111     (gives remainder)
100000000010001 / 111     (gives remainder)
1000000000010001 / 111  yields K00K00K00K0KK1  ie 21^16 +21^5+21^0
etc

result digits= numer digits-2

(I used https://www.pustudy.com/calculators/calc/math/base-calculator.html )

If we do this, and note the resulting pattern, we can verify that 21^9508+21^5+21^0 is composite (as required). We also know the result of the division in base 21, it has 9506 digits. One can use software like PariGP to convert the result back to decimal, and assess primality. In this case, the commands are seen below.

  1. Create text file base21_stringUnJoined.txt as seen following

[11,0,0,11,0,0,...,11,0,0,11,0,0,11,0,11,11,1] (total of 9506 digits, Pari requires numerical digits, 1 base-digit per line, ie

11
0
0
.
.
.
11
0
11
11
1

> q=readvec("base21_stringUnJoined.txt") > n=fromdigits(q,21) > w=digits(n) > #w \ (it reports as 12569 digits) > w[#w] \returns the last digit as 1, so n is possibly prime > ispseudoprime(n) \ returns 0, implying it is composite

Due to size, factor(n) timing is excessive.