### elementary number theory - how to know when a particular proof is appropriate for the given problem?

The main trouble I am currently having in math is knowing when the use cases are appropriate in a proof. I see many videos where they seem to choose a strategy like proof by contrapositive or proof by contradiction, but never quite understand how they came to the conclusion to use that proof strategy.Here are some examples I have come across and my own solutions to them using the recommended proofs the product of two odd integers is oddI used contradiction to solve itsuppose the product of two odd integers is even(2k+1)(2k+1) = 2k2(2k^2 + 2k) ...Read more

### modular arithmetic - Bell number modulo prime power

I'd like to ask how to fastly calculate the Bell number $B_n$ modulo a prime power, where $n$ is around one million....Read more

### Partition of $\Bbb N$ into infinite number of infinite disjoint sets: please help me understand a specific proof

Partition of N into infinite number of infinite disjoint sets?One answer for the above question about "Partition of N into infinite number of infinite disjoint sets" is the following (from Shai Covo):Let $$A_0 = \lbrace 1,3,5,7,9,\ldots \rbrace$$and $$A_1 = \lbrace 2^n 1 : n \in \mathbb{N} \rbrace,$$$$A_2 = \lbrace 2^n 3 : n \in \mathbb{N} \rbrace,$$$$A_3 = \lbrace 2^n 5 : n \in \mathbb{N} \rbrace,$$$$A_4 = \lbrace 2^n 7 : n \in \mathbb{N} \rbrace,$$$$A_5 = \lbrace 2^n 9 : n \in \mathbb{N} \rbrace,$$$$\cdots.$$Noting that for any two distinct e...Read more

### elementary number theory - Finding sum of digits of $m$

If the sequence of 5 positive integers (a,b,c,d,e) satisfy: $$abcde\leq {a+b+c+d+e} \leq 10m$$ then find the sum of digits of m.I don't know how to approach this question. I know it's not a good way to ask here, but, if you may give any hint regarding this for the approach only, I will try my best to use it and apply. Thank you. This is the question. And its answer is given as 9. I don't know how?...Read more

### combinations - How many $4$ digit numbers have a digit sum of $11$?

I used stars and bars for this problem, where there are $13$ spots and $3$ bars. This is $13$ choose $3$, but there are overcounts when $10$ and $11$ are a "digit." There are $4$ possibilities when $11$ is the first "digit" or $10$ as the last $3$ digits. there are $3$ choose $2$ possibilities. This is $286-7=279$. Am I correct?...Read more

### elementary number theory - IMO 1987 - function such that $f(f(n))=n+1987$

Show that there is no function $f: \mathbb{N} \to \mathbb{N}$ such that $f(f(n))=n+1987, \ \forall n \in \mathbb{N}$.This is problem 4 from IMO 1987 - see, for example, AoPS....Read more

### elementary number theory - Prove that $a$ is quadratic residue modulo every prime if and only if $a$ is perfect square

Possible Duplicate: Proving that an integer is the $n$ th power Prove that $a$ is quadratic residue modulo every prime if and only if $a$ is perfect squareMy attempt was,Since $a$ is perfect square, there exists a $y$ such that $a = y^2$. So, we must show that$x^2 \equiv y^2 \pmod{p}$ for every $p$. We have,$$x^2 - y^2 \equiv 0 \pmod{p}$$$$(x-y)(x+y) \equiv 0 \pmod{p}$$.Since $y$ is integer and can be calculated, we only need to solve for $x$ such that$x-y = k.p$ or $x+y = k.p$. In either case, if $p|y$, then $x = 0$ is a solution, otherwis...Read more

### elementary number theory - Suppose that $n \in \mathbb{Z}$. Prove that if $n^2 + 1$ is a perfect square, then $n$ is even.

This is a homework problem that I cannot figure out. I have figured out that if $n^2 + 1$ is a perfect square it can be written as such:$n^2 + 1 = k^2$.and if $n$ is even it can be written as such:$n = 2m$I believe I'm supposed to use the fact that if $n \pmod{4} \equiv 0$ or $1$ then it's a perfect square (maybe that's wrong).I cannot figure this out....Read more

### elementary number theory - Find all $n$ such that $\sqrt{5n+2}$ is an integer.

Here is my solution. There is no such $n$.If $n$ is odd, then, then $5n+2 \equiv 7 \pmod {10}$.Else, $5n+2 \equiv 2\pmod {10}$.But, the quadratic residues of $10$ are only $0,1,4,9,6,5$. Therefore, the expression is never a perfect square.Is it correct?...Read more

### elementary number theory - proof that the sum of 5 consecutive squares can not be a perfect square

I've read this post asking the same question.Since I can't comment on that thread and have trouble understanding the proof, I'm starting this thread.I understand that there are perfect squares that are divisible by 5 and I also understand that $(n^2+2) mod 5\equiv 2,3 \Rightarrow 5 \nmid (n^2+2)$,but why does that mean $5(n^2+2)$ can not be a perfect square?...Read more

### elementary number theory - Prove that none of $\{11, 111, 1111,\dots \}$ is the perfect square of an integer

Please help me with solving this :prove that none of $\{11, 111, 1111 \ldots \}$ is the square of any $x\in\mathbb{Z}$ (that is, there is no $x\in\mathbb{Z}$ such that $x^2\in\{11, 111, 1111, \ldots\}$)....Read more

### Show if a product of coprime numbers is a perfect square, so are the numbers - without FTA

I want to prove: $$\text{If }\gcd(a,b)=1\text{ and }ab=n^2,\text{ then }a,b\text{ are also perfect squares.}$$ Assume everyone is a positive integer, etc. Unless I'm deluding myself, this is pretty easy to show using unique prime factorization.But I want to do it without using primes or the (usual statement of the) FTA. That is, using coprime is fine, using the so-called Bezout identity (XGCD algorithm), etc. is fine. Is this even possible without essentially defining at least irreducibles, if not primes and prime factorization, along the w...Read more

### elementary number theory - Prove that a square of a positive integer cannot end with $4$ same digits different from $0$

Prove that a square of a positive integer cannot end with $4$ same digits different from $0$.I already proved that square of positive integer cannot end with none of digits $1,2,3,5,6,7,8,9$ using the remainder of division by $3,4,8,10$. Now problem is how to prove that this number cannot end with $4444$....Read more

### elementary number theory - Proving an expression is perfect square

I have this expression I got in one larger exercise:$$\frac{(2+\sqrt3)^{2n+1}+(2-\sqrt3)^{2n+1}-4}{6}\frac{(2+\sqrt3)^{2(n+1)+1}+(2-\sqrt3)^{2(n+1)+1}-4}{6}+1$$and i need to prove it is perfect square. I tried many different approaches but couldn't find way to show it is square. Interesting fact is $(2+\sqrt3)(2-\sqrt3)=1$ so I tried replacing $(2+\sqrt3)=x$ and $(2-\sqrt3)=1/x$ to see if I would get an idea.Alternative form I got after some steps and using equality giving $1$ I got:\frac{(2+\sqrt3)^{4n+4}(1-16((2- \sqrt3)^{2n+2})+66((2- \sqr...Read more

### elementary number theory - How to prove that if $n \in N$ is not a perfect square, then there is no rational $q$ s.t $q^2 = n$

I have constructed a proof for 2 not having such a $q$ in the format below:If we suppose $\exists q \in Q$ then we can write $(\frac{m}{n})^2=2 \implies m^2 = 2n^2$, where clearly the numbers $m^2, n^2$ must have an even number of primes in their factorisation in order for them to be to an even power; this implies that $2n^2$ has an odd number of primes in its prime factorisation, which in turn violates the Fundamental Theorem of Arithmetic which states that every prime factorisation is unique. An odd number of prime powers cannot qual an even ...Read more