Beautiful number theory problem

My 2 sikkas: The last digit of perfect squares [imath]\in {0, 1, 4, 5, 6, 9}[/imath].

A sum of factorials of the kind you posit is 1 + 2n for and we know that $2n$ is even and so $2n + 1$ has to be odd. So we can exclude perfect squares with last digits 0, 4 and 6 (evens), leaving us with 1, 5, 9. We already know that the theorem is true for 1 and 3 i.e. 1 and 9 (odd perfect squares). Is it also true for odd squares that have last digits 1, 5 and 9?

1 + 3 + 12 + 60 + ... means [imath]T_n = \frac{(n + 1)!}{2!}[/imath]

That's all I could muster ...
 
Hint: Perfect squares do not end in a 3. When n=4 you get 33.
I'll give you another hint tomorrow as the next hint will give everything away.
The proof is sweet--and I did it on my own!
 
Hint: Perfect squares do not end in a 3. When n=4 you get 33.
I'll give you another hint tomorrow as the next hint will give everything away.
The proof is sweet--and I did it on my own!
I have to admit that I tried it by considering lots and lots of cases before I found your proof with seven and then thought: if seven works, then five probably, too. The final proof was indeed a little beauty of only three lines.
 
Here is the proof.
Manually try for n=1, 2, 3, 4. n=1 and 3 work. Note that the sum is 33 for n=4. No perfect square ends in a 3.
For 5!, 6!, .... there are always factors of 2 and 5. Noting that 2*5=10, each of these factorials end in a 0.
Note that adding numbers that all end in a 0 will end in a 0. Adding a number that ends in 0 to 33 will end in a 3. No perfect squares end in a 3.
So only n=1 and n=3 will end in perfect square
 
Here is mine:

[math] S_n:=\sum_{j=1}^n j!\equiv 3\pmod{5} \text{ and }\left(\dfrac{3}{5}\right)\equiv 3^2\equiv -1\pmod{5} [/math]Hence [imath] S_n [/imath] is no square for [imath] n\geq 4, [/imath] and since [imath] S_2=3,[/imath] there are no other squares than [imath] S_1=1^2\, , \,S_3=3^2. [/imath]
 
Here is mine:

[math] S_n:=\sum_{j=1}^n j!\equiv 3\pmod{5} \text{ and }\left(\dfrac{3}{5}\right)\equiv 3^2\equiv -1\pmod{5} [/math]Hence [imath] S_n [/imath] is no square for [imath] n\geq 4, [/imath] and since [imath] S_2=3,[/imath] there are no other squares than [imath] S_1=1^2\, , \,S_3=3^2. [/imath]
I guess that I'm wrong but I would think that (3/5) = 3*5-1(mod 5). Doesn't 5-1(mod 5) = 0(mod5). If so, then (3/5) = 0(mod 5) and not 9. Where is my error?
 
I guess that I'm wrong but I would think that (3/5) = 3*5-1(mod 5). Doesn't 5-1(mod 5) = 0(mod5). If so, then (3/5) = 0(mod 5) and not 9. Where is my error?
[imath] \left(\dfrac{a}{p}\right) [/imath] is the Legendre symbol in this case and not a quotient of integers.

It determines whether a certain number [imath] a [/imath] is a square modulo a prime [imath] p [/imath] or not. It can easily be calculated as [math] \left(\dfrac{a}{p}\right) \equiv a^{(p-1)/2}\pmod{p}[/math]
The longer version says:

The modulo function is a ring homomorphism. Hence, [math] x^2=S_n= S_4+\sum_{k=5}^n k! \equiv S_4 = 33\equiv 3 \pmod{5} \text{ for }n\ge 4 [/math] gives a quadratic residue [imath] x^2\equiv 3 \pmod{5} .[/imath] However, this equation is not solvable because
[math] x^2=\left(\dfrac{a}{p}\right) \equiv a^{(p-1)/2}\pmod{p}=\left(\dfrac{3}{5}\right)=3^{(5-1)/2}=9\equiv -1\pmod{5}.[/math]At last, we only have to check the case [imath] S_2=3 [/imath] manually.

Edit: Of course, we can also check that the residues [imath] 0,1,2,3,4 [/imath] modulo [imath] 5 [/imath] squared are [imath] 0,1,4 [/imath] which do not include [imath] 3 [/imath] so no square modulo [imath] 5 [/imath] is possible. However, the Legendre symbol also works for larger primes where a manual check is more complicated.
 
Last edited:
Top