two "find all solutions" NT

Published on
3 mins read

(1) Find all positive integers m,n2m,n\geq 2, such that (i) m+1m+1 is a prime number of type 4k14k-1; (ii) there is a (positive) prime number pp and nonnegative integer aa, such that

m2n11m1=mn+pa.\frac{m^{2^n-1}-1}{m-1}=m^n+p^a.

first of all, my progress during the mock for this problem (i spent like 1.5hrs) was like RLLY BAD lmao. all i had was nn even     p=m+1\implies p=m+1 and aa odd. but anyway lemme spoil to u what i failed to realise:

m2n1m1=(m+1)(m2+1)(m2n1+1)\frac{m^{2^n}-1}{m-1}=(m+1)(m^2+1) \cdots (m^{2^{n-1}}+1)

i COMPLETELY didnt think of that rip T-T. but if u're not blind like me, u could then rewrite the equation as

m2n1m1(mn+1+1)=(m+1)(m2+1)(m2n1+1)(mn+1+1)=mpa.\frac{m^{2^n}-1}{m-1}-(m^{n+1}+1)=(m+1)(m^2+1) \cdots (m^{2^{n-1}}+1)-(m^{n+1}+1)=mp^a.

now naturally, what would be nice is if we could find/force a factor for LHS. well, the first part of LHS might suggest forcing a factor of m2k+1m^{2^k}+1, but we'll need this to divide the second part of LHS (i.e. mn+1+1m^{n+1}+1) as well. and indeed, if we take k=v2(n+1)k=v_2(n+1), this works! furthermore, m2k+1m^{2^k}+1 and mm are clearly coprime, so

m2k+1pa    m2k+1=pb.m^{2^k}+1 \mid p^a \implies m^{2^k}+1=p^b.

but notice that k1k \geq 1 implies 1-1 is a QR mod pp, so p1(mod4)p \equiv 1 \pmod{4} by fermat's christmas theorem, but this is clearly a contradiction by the first condition in the problem statement! so we must have k=v2(n+1)=0    k=v_2(n+1)=0 \implies nn is even.

yay now my 1.5hrs of work is fruitful here lol rip. by taking mod m+1m+1 in the original equation, we find that

pa0(modm+1)    p=m+1.p^a \equiv 0 \pmod{m+1} \implies p=m+1.

plugging this back into our original equation, we have that

p+m2+m3++m2n2=m2n11m1=mn+pa.p+m^2+m^3+\cdots+m^{2^n-2}=\frac{m^{2^n-1}-1}{m-1}=m^n+p^a.

then assuming n3n \geq 3, taking mod 8 gives

p+4pa(mod8),p+4 \equiv p^a \pmod{8},

which we can verify is a contradiction by recalling that p3,7(mod8)p \equiv 3, 7 \pmod{8}. finally, we check n=2n=2 to show that the solutions are

(m,n)=(p1,2)(m, n)=(p-1,2)

where pp is a prime of the form 4k14k-1. ✨

(2) Find all (k,n)(k, n) positive integers such that n!3n+28=k2n!-3n+28=k^2.

my thought process was smth like this: first, there's a factorial, which means i can easily make it divisible by stuff, so e.g. convenient for taking mods. also, the coeff of nn is 3, so it's kinda natural to just try mod 3 and assume n3n \geq 3, which unfortunately doesnt give much since 281(mod3).28 \equiv 1 \pmod{3}. (the problem is gg if it was like 29 tho, cuz 2 is not a QR mod 3.) okay but then RHS is k2,k^2, so this instantly makes me think of the QR trick. and since mod 3 is natural like i mentioned, i basically added 2 on both sides to force LHS div by 3, and also because i can easily do stuff with the legendre symbol for -2. okay so what we hv now is

n!3n+30=k2+2.n!-3n+30=k^2+2.

so in an ideal world, i would hope that if i had some odd prime pp dividing k2+2,k^2+2, then i can conclude smth abt pp and pray that p=3p=3 doesn't satisfy it (so it would imply n<3n < 3). e.g. if i must hv p1(mod8),p \equiv 1 \pmod{8}, that would be great. butttt unfortunately...

(2p)=(1p)(2p)=(1)p12(1)p218=1    p1,3(mod8)\left( \frac{-2}{p} \right) = \left( \frac{-1}{p} \right) \left( \frac{2}{p} \right) = (-1)^{\frac{p-1}{2}}(-1)^{\frac{p^2-1}{8}} = 1 \implies p \equiv 1, 3 \pmod{8}

so p=3p = 3 isn't a contradiction, and i pretty much just left it at that :(

okay now this next part is after i spoiled a bit of the sol to myself hehe: basically the idea of using QR trick is right, but what i missed is another factor of LHS that i can force. notice that

n!3n+30=n!3(n10).n!-3n+30=n!-3(n-10).

i was so fixated on the 3 that i didnt even think abt (n10)(n-10) lol, and that's a pretty key step. so let's assume n11n \geq 11 so that (n10)(n-10) divides n!n! and now we can sort of apply a similar thing, where we consider any odd prime dividing (n10(n-10... waait.. but what if (n10)(n-10) is even (which is generally less ideal when applying QR trick)... BUT, notice that

n!3n+30=(n10)(n!n103),n!-3n+30=(n-10)(\frac{n!}{n-10}-3),

and (n!n103)(\frac{n!}{n-10}-3) is always odd yayyy. so we'll just take that factor instead. cool, so again, by our work earlier, any odd prime pp dividing (n!n103)(\frac{n!}{n-10}-3) must satisfy p1,3(mod8).p \equiv 1, 3 \pmod{8}. but notice that

(n!n103)35(mod8),(\frac{n!}{n-10}-3) \equiv -3 \equiv 5 \pmod{8},

which means it's impossible for all of its prime factors to be 1,3(mod8)1, 3 \pmod{8}, so we have our desired contradiction! this means that n<11,n < 11, and we can just verify 1n101 \leq n \leq 10 which i won't show here, but the only solution is (3,5).(3, 5).

alternatively, if u still wanted to use the (n10)(n-10) factor, here's how it'd go

case 1: the ideal case where n10n-10 is odd
again, all of it's prime factors are 1,3(mod8),1, 3 \pmod{8}, so n3,5(mod8).n \equiv 3, 5 \pmod{8}. but plugging this into our equation, it means that k23,5(mod8),k^2 \equiv 3, 5 \pmod{8}, which is a contradiction.

case 2: the less ideal case where n10n-10 is even (which also means k2k^2 is even)
case 2.1: k20(mod8)k^2 \equiv 0 \pmod{8}
notice that k20(mod8)    k20(mod16)    n4(mod16).k^2 \equiv 0 \pmod{8} \implies k^2 \equiv 0 \pmod{16} \implies n \equiv 4 \pmod{16}. thus, n10=(16n+4)10=2(8n3).n-10=(16n'+4)-10=2(8n'-3). now, considering the factor (8n3),(8n'-3), then by our previous work, 8n31,3(mod8),8n'-3 \equiv 1, 3 \pmod{8}, which is clearly false. (notice how we still end up considering an odd factor.)
case 2.2: k24(mod8)k^2 \equiv 4 \pmod{8}
we get that n8(mod16),n \equiv 8 \pmod{16}, so n10=2(8n1)n-10=2(8n'-1) and we arrive at a contradiction similar to the above case.