Stay ahead of learning milestones! Enroll in a class over the summer!

G
Topic
First Poster
Last Poster
k a May Highlights and 2025 AoPS Online Class Information
jlacosta   0
May 1, 2025
May is an exciting month! National MATHCOUNTS is the second week of May in Washington D.C. and our Founder, Richard Rusczyk will be presenting a seminar, Preparing Strong Math Students for College and Careers, on May 11th.

Are you interested in working towards MATHCOUNTS and don’t know where to start? We have you covered! If you have taken Prealgebra, then you are ready for MATHCOUNTS/AMC 8 Basics. Already aiming for State or National MATHCOUNTS and harder AMC 8 problems? Then our MATHCOUNTS/AMC 8 Advanced course is for you.

Summer camps are starting next month at the Virtual Campus in math and language arts that are 2 - to 4 - weeks in duration. Spaces are still available - don’t miss your chance to have an enriching summer experience. There are middle and high school competition math camps as well as Math Beasts camps that review key topics coupled with fun explorations covering areas such as graph theory (Math Beasts Camp 6), cryptography (Math Beasts Camp 7-8), and topology (Math Beasts Camp 8-9)!

Be sure to mark your calendars for the following upcoming events:
[list][*]May 9th, 4:30pm PT/7:30pm ET, Casework 2: Overwhelming Evidence — A Text Adventure, a game where participants will work together to navigate the map, solve puzzles, and win! All are welcome.
[*]May 19th, 4:30pm PT/7:30pm ET, What's Next After Beast Academy?, designed for students finishing Beast Academy and ready for Prealgebra 1.
[*]May 20th, 4:00pm PT/7:00pm ET, Mathcamp 2025 Qualifying Quiz Part 1 Math Jam, Problems 1 to 4, join the Canada/USA Mathcamp staff for this exciting Math Jam, where they discuss solutions to Problems 1 to 4 of the 2025 Mathcamp Qualifying Quiz!
[*]May 21st, 4:00pm PT/7:00pm ET, Mathcamp 2025 Qualifying Quiz Part 2 Math Jam, Problems 5 and 6, Canada/USA Mathcamp staff will discuss solutions to Problems 5 and 6 of the 2025 Mathcamp Qualifying Quiz![/list]
Our full course list for upcoming classes is below:
All classes run 7:30pm-8:45pm ET/4:30pm - 5:45pm PT unless otherwise noted.

Introductory: Grades 5-10

Prealgebra 1 Self-Paced

Prealgebra 1
Tuesday, May 13 - Aug 26
Thursday, May 29 - Sep 11
Sunday, Jun 15 - Oct 12
Monday, Jun 30 - Oct 20
Wednesday, Jul 16 - Oct 29

Prealgebra 2 Self-Paced

Prealgebra 2
Wednesday, May 7 - Aug 20
Monday, Jun 2 - Sep 22
Sunday, Jun 29 - Oct 26
Friday, Jul 25 - Nov 21

Introduction to Algebra A Self-Paced

Introduction to Algebra A
Sunday, May 11 - Sep 14 (1:00 - 2:30 pm ET/10:00 - 11:30 am PT)
Wednesday, May 14 - Aug 27
Friday, May 30 - Sep 26
Monday, Jun 2 - Sep 22
Sunday, Jun 15 - Oct 12
Thursday, Jun 26 - Oct 9
Tuesday, Jul 15 - Oct 28

Introduction to Counting & Probability Self-Paced

Introduction to Counting & Probability
Thursday, May 15 - Jul 31
Sunday, Jun 1 - Aug 24
Thursday, Jun 12 - Aug 28
Wednesday, Jul 9 - Sep 24
Sunday, Jul 27 - Oct 19

Introduction to Number Theory
Friday, May 9 - Aug 1
Wednesday, May 21 - Aug 6
Monday, Jun 9 - Aug 25
Sunday, Jun 15 - Sep 14
Tuesday, Jul 15 - Sep 30

Introduction to Algebra B Self-Paced

Introduction to Algebra B
Tuesday, May 6 - Aug 19
Wednesday, Jun 4 - Sep 17
Sunday, Jun 22 - Oct 19
Friday, Jul 18 - Nov 14

Introduction to Geometry
Sunday, May 11 - Nov 9
Tuesday, May 20 - Oct 28
Monday, Jun 16 - Dec 8
Friday, Jun 20 - Jan 9
Sunday, Jun 29 - Jan 11
Monday, Jul 14 - Jan 19

Paradoxes and Infinity
Mon, Tue, Wed, & Thurs, Jul 14 - Jul 16 (meets every day of the week!)

Intermediate: Grades 8-12

Intermediate Algebra
Sunday, Jun 1 - Nov 23
Tuesday, Jun 10 - Nov 18
Wednesday, Jun 25 - Dec 10
Sunday, Jul 13 - Jan 18
Thursday, Jul 24 - Jan 22

Intermediate Counting & Probability
Wednesday, May 21 - Sep 17
Sunday, Jun 22 - Nov 2

Intermediate Number Theory
Sunday, Jun 1 - Aug 24
Wednesday, Jun 18 - Sep 3

Precalculus
Friday, May 16 - Oct 24
Sunday, Jun 1 - Nov 9
Monday, Jun 30 - Dec 8

Advanced: Grades 9-12

Olympiad Geometry
Tuesday, Jun 10 - Aug 26

Calculus
Tuesday, May 27 - Nov 11
Wednesday, Jun 25 - Dec 17

Group Theory
Thursday, Jun 12 - Sep 11

Contest Preparation: Grades 6-12

MATHCOUNTS/AMC 8 Basics
Friday, May 23 - Aug 15
Monday, Jun 2 - Aug 18
Thursday, Jun 12 - Aug 28
Sunday, Jun 22 - Sep 21
Tues & Thurs, Jul 8 - Aug 14 (meets twice a week!)

MATHCOUNTS/AMC 8 Advanced
Sunday, May 11 - Aug 10
Tuesday, May 27 - Aug 12
Wednesday, Jun 11 - Aug 27
Sunday, Jun 22 - Sep 21
Tues & Thurs, Jul 8 - Aug 14 (meets twice a week!)

AMC 10 Problem Series
Friday, May 9 - Aug 1
Sunday, Jun 1 - Aug 24
Thursday, Jun 12 - Aug 28
Tuesday, Jun 17 - Sep 2
Sunday, Jun 22 - Sep 21 (1:00 - 2:30 pm ET/10:00 - 11:30 am PT)
Monday, Jun 23 - Sep 15
Tues & Thurs, Jul 8 - Aug 14 (meets twice a week!)

AMC 10 Final Fives
Sunday, May 11 - Jun 8
Tuesday, May 27 - Jun 17
Monday, Jun 30 - Jul 21

AMC 12 Problem Series
Tuesday, May 27 - Aug 12
Thursday, Jun 12 - Aug 28
Sunday, Jun 22 - Sep 21
Wednesday, Aug 6 - Oct 22

AMC 12 Final Fives
Sunday, May 18 - Jun 15

AIME Problem Series A
Thursday, May 22 - Jul 31

AIME Problem Series B
Sunday, Jun 22 - Sep 21

F=ma Problem Series
Wednesday, Jun 11 - Aug 27

WOOT Programs
Visit the pages linked for full schedule details for each of these programs!


MathWOOT Level 1
MathWOOT Level 2
ChemWOOT
CodeWOOT
PhysicsWOOT

Programming

Introduction to Programming with Python
Thursday, May 22 - Aug 7
Sunday, Jun 15 - Sep 14 (1:00 - 2:30 pm ET/10:00 - 11:30 am PT)
Tuesday, Jun 17 - Sep 2
Monday, Jun 30 - Sep 22

Intermediate Programming with Python
Sunday, Jun 1 - Aug 24
Monday, Jun 30 - Sep 22

USACO Bronze Problem Series
Tuesday, May 13 - Jul 29
Sunday, Jun 22 - Sep 1

Physics

Introduction to Physics
Wednesday, May 21 - Aug 6
Sunday, Jun 15 - Sep 14
Monday, Jun 23 - Sep 15

Physics 1: Mechanics
Thursday, May 22 - Oct 30
Monday, Jun 23 - Dec 15

Relativity
Mon, Tue, Wed & Thurs, Jun 23 - Jun 26 (meets every day of the week!)
0 replies
jlacosta
May 1, 2025
0 replies
Something weird with this one FE in integers (probably challenging, maybe not)
Gaunter_O_Dim_of_math   1
N 20 minutes ago by Rayanelba
Source: Pang-Cheng-Wu, FE, problem number 52.
During FE problems' solving I found a very specific one:

Find all such f that f: Z -> Z and for all integers a, b, c
f(a^3 + b^3 + c^3) = f(a)^3 + f(b)^3 + f(c)^3.

Everything what I've got is that f is odd, f(n) = n or -n or 0
for all n from 0 to 11 (just bash it), but it is very simple and do not give the main idea.
I actually have spent not so much time on this problem, but definitely have no clue. As far as I see, number theory here or classical FE solving or advanced methods, which I know, do not work at all.
Is here a normal solution (I mean, without bashing and something with a huge number of ugly and weird inequalities)?
Or this is kind of rubbish, which was put just for bash?
1 reply
Gaunter_O_Dim_of_math
2 hours ago
Rayanelba
20 minutes ago
USAMO 1985 #2
Mrdavid445   6
N 28 minutes ago by anticodon
Determine each real root of \[x^4-(2\cdot10^{10}+1)x^2-x+10^{20}+10^{10}-1=0\]correct to four decimal places.
6 replies
Mrdavid445
Jul 26, 2011
anticodon
28 minutes ago
Balkan MO 2022/1 is reborn
Assassino9931   7
N an hour ago by Rayvhs
Source: Bulgaria EGMO TST 2023 Day 1, Problem 1
Let $ABC$ be a triangle with circumcircle $k$. The tangents at $A$ and $C$ intersect at $T$. The circumcircle of triangle $ABT$ intersects the line $CT$ at $X$ and $Y$ is the midpoint of $CX$. Prove that the lines $AX$ and $BY$ intersect on $k$.
7 replies
Assassino9931
Feb 7, 2023
Rayvhs
an hour ago
Inequality with rational function
MathMystic33   3
N 2 hours ago by ariopro1387
Source: Macedonian Mathematical Olympiad 2025 Problem 2
Let \( n > 2 \) be an integer, \( k > 1 \) a real number, and \( x_1, x_2, \ldots, x_n \) be positive real numbers such that \( x_1 \cdot x_2 \cdots x_n = 1 \). Prove that:

\[
\frac{1 + x_1^k}{1 + x_2} + \frac{1 + x_2^k}{1 + x_3} + \cdots + \frac{1 + x_n^k}{1 + x_1} \geq n.
\]
When does equality hold?
3 replies
1 viewing
MathMystic33
4 hours ago
ariopro1387
2 hours ago
No more topics!
Floor of square root
v_Enhance   43
N Apr 25, 2025 by Ilikeminecraft
Source: APMO 2013, Problem 2
Determine all positive integers $n$ for which $\dfrac{n^2+1}{[\sqrt{n}]^2+2}$ is an integer. Here $[r]$ denotes the greatest integer less than or equal to $r$.
43 replies
v_Enhance
May 3, 2013
Ilikeminecraft
Apr 25, 2025
Floor of square root
G H J
Source: APMO 2013, Problem 2
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
v_Enhance
6877 posts
#1 • 14 Y
Y by abk2015, Davi-8191, integrated_JRC, itslumi, MathLuis, centslordm, guillermo.dinamarca, HWenslawski, GeoKing, Adventure10, Mathefishian, bjump, ItsBesi, and 1 other user
Determine all positive integers $n$ for which $\dfrac{n^2+1}{[\sqrt{n}]^2+2}$ is an integer. Here $[r]$ denotes the greatest integer less than or equal to $r$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
v_Enhance
6877 posts
#2 • 26 Y
Y by ssilwa, qua96, mathisfun7, emiliorosado, abk2015, raknum007, mathisreal, Promi, rashah76, mathleticguyyy, Muaaz.SY, itslumi, MathLuis, centslordm, Kimchiks926, guillermo.dinamarca, HWenslawski, Ahmad_Alo, samrocksnature, Halykov06, Lamboreghini, Adventure10, aidan0626, Mango247, Mathefishian, and 1 other user
This was a silly problem; there are no such $n$.

Let $n = m^2 + k$ where $0 \le k \le 2m$. Then we require \[
	\frac{(m^2+k)^2+1}{m^2+2} = m^2 + (2k-2) + \frac{(k-2)^2+1}{m^2+2}
	\] to be an integer. Now $(k-2)^2 + 1 < 4m^2 + 8$, and hence $\tfrac{(k-2)^2+1}{m^2+2}$ must be either $1$, $2$ or $3$. We will examine each case.

If $(k-2)^2+1 = m^2+2$, then $(k-2)^2 = m^2+1$, which is impossible unless $m=0$ and $k-2 = \pm 1$, so no solution in this case.

If $(k-2)^2+1 = 2m^2+4$, then $(k-2)^2 - 2m^2 = 3$. Modulo $3$ we get that $(k-2)^2 + m^2 \equiv 0 \pmod{3}$ which is enough to force $k-2 \equiv m \equiv 0 \pmod{3}$, and yet this implies $9 \mid (k-2)^2 - 2m^2 = 3$, contradiction.

Finally, if $(k-2)^2 + 1 = 3m^2 + 6$, then $(k-2)^2 - 3m^2 = 5$. Again, taking modulo $3$, we get $(k-2)^2 \equiv 2 \pmod{3}$ which is not possible.

So, no solutions for $n$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
IDMasterz
1412 posts
#3 • 2 Y
Y by centslordm, Adventure10
It was.. pretty silly... though it was just a bounding argument really.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
hatchguy
555 posts
#4 • 5 Y
Y by Joy_Gomuj, centslordm, lrjr24, Adventure10, Mango247
Another way to solve $m^2 + 2 | a^2 +1 $.

Notice that if a prime $p$ divides $a^2+1$ then $p$ is of the form $4k+1$. So all prime divisors of $m^2 +2 $ are of the form $4k + 1$. However, this would imply that $m^2 +2 \equiv 1 \pmod 4 \implies m^2 \equiv 3 \pmod 4$, which can't happen.

EDIT: V_enhance is right, wrong way to finish the problem.
This post has been edited 1 time. Last edited by hatchguy, May 4, 2013, 4:51 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
v_Enhance
6877 posts
#5 • 6 Y
Y by centslordm, SSaad, Adventure10, Mango247, Mathefishian, and 1 other user
hatchguy wrote:
Notice that if a prime $p$ divides $a^2+1$ then $p$ is of the form $4k+1$. So all prime divisors of $m^2 +2 $ are of the form $4k + 1$. However, this would imply that $m^2 +2 \equiv 1 \pmod 4 \implies m^2 \equiv 3 \pmod 4$, which can't happen.
If $a$ is even, then it's possible that $m^2 + 2 \equiv 2 \pmod{4} \implies m^2 \equiv 0 \pmod{4}$, which is definitely permissible. In particular, $(m,a) = (12, 27)$ is a solution here.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Nguyenhuyhoang
207 posts
#6 • 3 Y
Y by centslordm, Adventure10, Mango247
From v_Enhance's solution, we have that $k \leq 2m$, and after some calculations, we have $3k+1 \vdots p^2+2$. Combine these two and use the inequality method, we easily found that there is no solution.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
JSGandora
4216 posts
#7 • 4 Y
Y by emiliorosado, centslordm, Adventure10, Mango247
Let $m^2$ be the greatest square less than or equal to $n$, then $m^2\leq n<(m+1)^2$. Now let $n=m^2+r$ where $0\leq r<2m+1$. So $[\sqrt{n}]^2=m^2$ and thus
\begin{align*}\frac{n^2+1}{[\sqrt{n}]^2+2} &=\frac{(m^2+r)^2+1}{m^2+2}\\
&=\frac{m^4+2m^2r+r^2+1}{m^2+2} \\
&=m^2+\frac{2m^2r+r^2+1-2m^2}{m^2+2} \\
&=m^2+(2r-2)+\frac{r^2+1-4r+4}{m^2+2} \\
&=m^2+2r-2+\frac{r^2-4r+5}{m^2+2}
\end{align*}
We place a bound on the numerator:
\[r^2-4r+5\leq (2m+1)^2-4(2m+1)+5=4m^2-4m+2< 4(m^2+2).\]
Therefore in order for the expression to be an integer, we must have
\begin{align*}r^2-4r+5=(r-2)^2+1&=\{m^2+2, 2m^2+4, 3m^2+6\} \\ 
(r-2)^2&=\{m^2+1, 2m^2+3, 3m^2+5 \}
\end{align*}
The first case $m^2+1$ is impossible since there are no two consecutive numbers that are squares. The second case is impossible by taking modulo $8$ since the quadratic residues modulo $8$ are $0, 1,$ and $4$, then $2m^2+3$ can be congruent to $3, 5, 3$, none of which are quadratic residues. And the last case take modulo $3$ and see that $3m^2+5$ is congruent to $2$ modulo $3$ which is not a quadratic residue. Therefore there are no such integers $n$. $\blacksquare$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
fclvbfm934
759 posts
#8 • 3 Y
Y by centslordm, Adventure10, Mango247
Let $n = m^2 + k$, where $0 \le k \le 2m$. Therefore, $[\sqrt{n}] = m$. We are therefore trying to see when $\frac{m^4 + 2m^k + k^2 + 1}{m^2 + 2}$ is an integer. We rewrite the fraction as $m^2 + 2k-2 + \frac{k^2 - 4k + 5}{m^2 + 2}$. So we want $m^2 + 2 | k^2 - 4k + 5$. But notice that since $k \le 2m$, we have $k^2 - 4k + 5 \le k^2 + 5 \le 4m^2 + 5$. Therefore, if $\frac{k^2 - 4k + 5}{m^2 + 2}$ is an integer, then it is either $1, 2, 3$. We now go through the casework:

Case 1: the integer is 1:
Therefore, $k^2 - 4k + 5 = m^2 + 2$ which leads to $(k-2)^2  = m^2 + 1$. The only squares the differ by $1$ are $0$ and $1$. which would give us $m = 0$, contradiction. There are no solutions for this case.

Case 2: the integer is 2:
We then have $(k-2)^2 = 2m^2 + 3$. Let $a = k-2$ and $b = m$. Then, we have $a^2 - 2b^2 = 3 \Rightarrow a^2 \equiv 2b^2 \pmod{3}$. Since $\left( \frac{2}{3} \right) = -1$, we see that $3|a, b$ but then $9|a^2 - 2b^2 \Rightarrow 9|3$, yet another contradiction. There are no solutions for this case.

Case 3: the integer is 3:
We then have $(k-2)^2 = 3m^2 + 5$ which would give us $(k-2)^2 \equiv 2 \pmod{3}$, yet another contradiction.

Therefore, there are no solutions at all.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Taussig
23 posts
#9 • 2 Y
Y by centslordm, Adventure10
At v enhance, what was your reasoning behind defining m and k? I don't understand. Please explain.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
leminscate
109 posts
#10 • 3 Y
Y by centslordm, Adventure10, Mango247
Basically, it's so that you don't have the floor function of the square root hanging around, as it is annoying to deal with. So you let $[\sqrt{n}]=m$, i.e. $m^2 \leq n \leq (m+1)^2-1 = m^2+2m$.
We can then let $n=m^2+k$ where $0 \leq k \leq 2m$. The rest of the solution is then standard divisibility ideas and bounding.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Taussig
23 posts
#11 • 3 Y
Y by centslordm, Adventure10, Mango247
leminscate wrote:
Basically, it's so that you don't have the floor function of the square root hanging around, as it is annoying to deal with. So you let $[\sqrt{n}]=m$, i.e. $m^2 \leq n \leq (m+1)^2-1 = m^2+2m$.
We can then let $n=m^2+k$ where $0 \leq k \leq 2m$. The rest of the solution is then standard divisibility ideas and bounding.

Interesting, thank you for pointing that out. Would the k be just some unknown constant?
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
SMOJ
2663 posts
#12 • 3 Y
Y by centslordm, Adventure10, Mango247
yes
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
ind
133 posts
#13 • 3 Y
Y by centslordm, Adventure10, Mango247
if we divide by the usual method of long division we get remainder as$p^2-4p+5=0$
where$ p$ is the $r $used by gandora
but $p$ is not an integer.
We can even generalise it...
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
bobthesmartypants
4337 posts
#14 • 3 Y
Y by centslordm, Adventure10, Mango247
My solution:

Let $n=x^2+2k$ where $0\le k\le 2x$; then $\lfloor \sqrt{n}\rfloor^2=x^2$ so we want to find when $\dfrac{(x^2+k)^2+1}{x^2+2}$ is integral.

After polynomial division this is equivalent to finding when $\dfrac{(k-2)^2+1}{x^2+2}$ is integral. Since $(k-2)^2+1 \le (2x-2)^2+1 < 4(x^2+2)$, we have three cases:

Case 1: $(k-2)^2+1=x^2+2$. In this case $(k-2)^2=x^2+1$ clear contradiction.

Case 2: $(k-2)^2+1=2(x^2+2)$. In this case $(k-2)^2-3=2x^2$; taking mod 8 gives the LHS equal to 1, 5, or 6 mod 8 and the only possible one is 6 mod 8. But then $2x^2\equiv 6\pmod{8}\implies x^2\equiv 3\pmod{4}$ contradiction.

Case 3: $(k-2)^2+1=3(x^2+2)$. In this case $(k-2)^2-5=3x^2$. Taking mod 9, the LHS can be 4, 5, 8, or 2 mod 9 which are all impossible, contradiction.

Thus there are no solutions.

EDIT: oops v_Enhance pointed out above that taking mod 3 for cases 2 and 3 suffice...
This post has been edited 1 time. Last edited by bobthesmartypants, Mar 8, 2016, 7:16 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
songssari
102 posts
#15 • 3 Y
Y by centslordm, Adventure10, Mango247
v_Enhance wrote:
This was a silly problem; there are no such $n$.

Let $n = m^2 + k$ where $0 \le k \le 2m$. Then we require \[
	\frac{(m^2+k)^2+1}{m^2+2} = m^2 + (2k-2) + \frac{(k-2)^2+1}{m^2+2}
	\]to be an integer. Now $(k-2)^2 + 1 < 4m^2 + 8$, and hence $\tfrac{(k-2)^2+1}{m^2+2}$ must be either $1$, $2$ or $3$. We will examine each case.

If $(k-2)^2+1 = m^2+2$, then $(k-2)^2 = m^2+1$, which is impossible unless $m=0$ and $k-2 = \pm 1$, so no solution in this case.

If $(k-2)^2+1 = 2m^2+4$, then $(k-2)^2 - 2m^2 = 3$. Modulo $3$ we get that $(k-2)^2 + m^2 \equiv 0 \pmod{3}$ which is enough to force $k-2 \equiv m \equiv 0 \pmod{3}$, and yet this implies $9 \mid (k-2)^2 - 2m^2 = 3$, contradiction.

Finally, if $(k-2)^2 + 1 = 3m^2 + 6$, then $(k-2)^2 - 3m^2 = 5$. Again, taking modulo $3$, we get $(k-2)^2 \equiv 2 \pmod{3}$ which is not possible.

So, no solutions for $n$.
Or I think you can look at the second case modulo 8...
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Vrangr
1600 posts
#16 • 4 Y
Y by AlastorMoody, centslordm, Adventure10, Mango247
Solution
This post has been edited 7 times. Last edited by Vrangr, May 3, 2020, 9:39 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Mathotsav
1508 posts
#17 • 3 Y
Y by centslordm, Adventure10, Mango247
v_Enhance wrote:
Determine all positive integers $n$ for which $\dfrac{n^2+1}{[\sqrt{n}]^2+2}$ is an integer. Here $[r]$ denotes the greatest integer less than or equal to $r$.
Solution:
Let $n=k^2+l$ with $l \leq 2k$.
So we have $k^2+2|(k^2+l)^2+1$ or $k^2+2|k^4+2k^2l+l^2+1$. As $k^2+2|k^4-4$ and $k^2+2|2k^2l+4l$ we get that $k^2+2|l^2+4l+5=(l+2)^2+1$. If $k$ is odd then $k^2+2$ is $3$ mod $4$ but since $(l+2)^2+1$ has no divisor of the form $4k+3$ this gives a contradiction. So let $l=2m$. Thus $4m^2+2|(l+2)^2+1$. So $l$ is odd so let $l=2s-1$ for some $n$. So we have $2m^2+1|2s^2+2s+1$. We get that $s \leq n$ or $s \leq 2m$. Thus $2s^2+2s+1 \leq 8m^2+8m+1 \leq 9m^2+1$ for $m \geq 8$. So for $m \geq 8$ if $2s^2+2s+=k(2m^2+1)$ then $k$ is odd, obviously $k \neq 1$ as $s^2+s$ can never be equal to $m^2$ for positive integers $m,s$, and $k \leq 4$. So we have $k=3$. So we get that $3|2s^2+2s+1$ which is a contradiction by mod $3$ check. Thus $m<8$ if $2m^2+1|2s^2+2s+1$. One can easily check that no solutions exist for $m<8$. Hence no solutions for $m$ exist. Thus no solutions for the original problem exist
This post has been edited 1 time. Last edited by Mathotsav, Oct 12, 2019, 6:56 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Lukaluce
268 posts
#18 • 1 Y
Y by centslordm
v_Enhance wrote:
hatchguy wrote:
Notice that if a prime $p$ divides $a^2+1$ then $p$ is of the form $4k+1$. So all prime divisors of $m^2 +2 $ are of the form $4k + 1$. However, this would imply that $m^2 +2 \equiv 1 \pmod 4 \implies m^2 \equiv 3 \pmod 4$, which can't happen.
If $a$ is even, then it's possible that $m^2 + 2 \equiv 2 \pmod{4} \implies m^2 \equiv 0 \pmod{4}$, which is definitely permissible. In particular, $(m,a) = (12, 27)$ is a solution here.

You probably wish to say "If $a$ is odd".
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
IAmTheHazard
5001 posts
#19 • 1 Y
Y by centslordm
The answer is that there is no such $n$.
We first let $n=a^2+b$, where $0 \leq b \leq 2a$. Then, we need:
$$\frac{(a^2+b)^2+1}{a^2+2}=a^2+2(b-1)+\frac{(b-2)^2+1}{a^2+2}$$to be an integer. This is equivalent to saying $\tfrac{(b-2)^2+1}{a^2+2}$ is an integer, call this $k$. We now consider the following cases on which integer $k$ is:
Case 1: $k=1$. Then we need $(b-2)^2=a^2+1$. However, the only consecutive perfect squares are $0,1$, which implies $(b-2)^2=1$ and $a=0$. But since $0 \leq b \leq 2a$, we also need $b=0$ which is a contradiction.
Case 2: $k=2$. Then we need $(b-2)^2=2a^2+3$. Now take $\pmod{3}$, which shows that the LHS is either $0,1$ and the RHS is either $0,2$. This implies that $b \equiv 2 \pmod{1}$ and $a \equiv 0 \pmod{3}$, so $a=3m$ and $b=3n+2$ for some positive integers $m,n$. When we substitute, the equation becomes:
$$9n^2=18m^2+3$$wherupon taking $\pmod{9}$ implies that no solutions exist.
Case 3: $k=3$. Then we need $(b-2)^2+1=3a^2+6$. Taking $\pmod{3}$, the LHS is either $1,2$ and the RHS is $0$, so no solutions exist in this case.
Case 4: $k \geq 4$. This implies $(b-2)^2+1=ka^2+2k$. But for $a \geq 2$ we have:
\begin{align*}
(b-2)^2+1&\geq (2a-2)^2+1\\
&\geq (2a)^2+1\\
&\geq 4a^2+1\\
&\geq ka^2+1\\
&> ka^2+2k
\end{align*}so equality never holds (the reason we need $a \geq 2$ is because the first inequality is not true if $a=1$ and $b=0$, for instance). If $a=1$ the LHS is still less than the RHS, since the LHS is at most $2^2+1=5$ and the RHS is at least $12$. Thus there are no solutions in this case either.
Combining these cases finishes. $\blacksquare$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
MathLuis
1526 posts
#20 • 1 Y
Y by centslordm
v_Enhance wrote:
Determine all positive integers $n$ for which $\dfrac{n^2+1}{[\sqrt{n}]^2+2}$ is an integer. Here $[r]$ denotes the greatest integer less than or equal to $r$.

Problem not common :P . Assume that exists solutions:
It is known that $f(x)=x^2+c$ is surjective on $x \in \mathbb Z^+$. So we can let $n=a^2+b$ where $0 \le b \le 2a$ and hence $[\sqrt{n}]=a$ now lets use these informations:
$$a^2+2 \mid a^4+2a^2b+b^2+1 \implies a^2+2 \mid (b-2)^2+1$$$$b-2 \le 2(a-1) \implies (b-2)^2+1 \le 4a^2-8a+5<4a^2+8=4(a^2+2)$$That means $k(a^2+2)=(b-2)^2+1$ where $k \in (1,3)$
Case 1.- $k=1$
$$(b-2)^2=a^2+1 \implies (b-1)(b-3)=a^2 \implies b=4 \implies a^2=3 \; \text{contradiction!!}$$Case 2.- $k=2$
$$(b-2)^2 \equiv 2a^2+3 \pmod 3 \implies 9 \mid (b-2)^2 \; \text{and} \; 9 \mid a^2$$$$(b-2)^2-2a^2=3 \implies 3 \equiv 0 \pmod 9 \; \text{contradiction!!}$$Case 3.- $k=3$
$$(k-2)^2+1 \equiv 0 \pmod 3 \; \text{contradiction!!}$$Hence no such positive integers.
Thus we are done :blush:
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
jasperE3
11333 posts
#21 • 2 Y
Y by centslordm, Mango247
If $n=m^2+k,k\in[0,2m]\cap\mathbb Z,m\in\mathbb Z$ then we have:
$$\frac{k^2-4k-3}{m^2+2}+m^2+2k-2\in\mathbb Z.$$By the aforementioned bounds, we obtain $\frac{k^2-4k-3}{m^2+2}\in\{1,2,3\}$.

$\textbf{Case 1: }\frac{k^2-4k-3}{m^2+2}=1$
$\Leftrightarrow(k-2)^2-m^2=1$, and it's well-known that the only squares which are one apart are $0$ and $1$, but there are no solutions here after testing $k\in\{1,3\}$, $m=0$.

$\textbf{Case 2: }\frac{k^2-4k-3}{m^2+2}=2$
We have $(k-2)^2=2m^2+3$, now$\pmod3$ gives that $k\equiv2$ and $m\equiv0$. Now $v_3(\text{LHS})\ge2$ while if $m=3n$, $v_3(\text{RHS})=v_3(3(6n^2+1))=1$, so no solutions.

$\textbf{Case 3: }\frac{k^2-4k-3}{m^2+2}=3$
So $(k-2)^2=3m^2+5$, by$\pmod5$ we have $(k-2)^2\equiv3m^2$, which enforces $k\equiv2$ and $m\equiv0$. Then $v_5(\text{LHS})\ge2$ while, if $m=5n$, $v_5(\text{RHS})=v_5(5(15n^2+1))=1$, contradiction.

No $n$ satisfy this condition. $\square$
This post has been edited 1 time. Last edited by jasperE3, May 22, 2021, 10:47 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
srisainandan6
2811 posts
#22 • 1 Y
Y by centslordm
Similar solution to everyone else, written in a hurry though.

Let $n=k^2+m$, where $k,m$ are both nonnegative integers and $m \in [0,2k]$.

We have that $\frac{{(k^2+m)}^2+1}{k^2+2} = k^2+2m-2+\frac{m^2-4m+5}{k^2+2}$ needs to be an integer, so $\frac{m^2-4m+5}{k^2+2}$ needs to be an integer. Since $m \in [0,2k]$, we have that $\frac{m^2-4m+5}{k^2+2}$ can only be $1,2,$ or $3$. I claim that it can't be any.

If the quantity is equal to $1$, we have that ${(m-2)}^2 = k^2+1$, and this clearly holds false.

If the quantity equals to $2$, we have that ${(m-2)}^2=2k^2+3$. Observing this in mod $3$, we see that $m \equiv 2 \mod 3$ and $k \equiv 0 \mod 3$. Let $m=3m'+2$ and $k=3k'$. Substituting these values in we get that $3{(m')}^2=6{(k')}^2+1$, which clearly isn't possible again by observing in modulo $3$.

If the quantity is equal to $3$, we have that ${(m-2)}^2=3k^2+5$. The right hand side is equal to $2 \mod 3$, hence this is absurd.

From this we have that $\frac{m^2-4m+5}{k^2+2}$ can never be an integer, so there exist no solutions for $n$. $\blacksquare$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
starchan
1609 posts
#23
Y by
.
There is no such $n$. Let $k = \lfloor \sqrt{n} \rfloor$ and $n = k^2 + \ell$ for some $0 \leqslant \ell \leqslant 2k$. Clearly $k^2 + 2 \mid (\ell-2)^2+1$. Due to clear size reasons the quotient of the last divisibility cannot exceed $3$. When the quotient exceeds $1$ working mod $3$ yields contradiction and when the quotient is $1$ there is only one possibility; which fails as well.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
DottedCaculator
7354 posts
#24
Y by
Solution
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Fakesolver19
106 posts
#26
Y by
Solution
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
megarnie
5608 posts
#27
Y by
There are no such $n$.

Let $n=m^2+c$, where $0\le c\le 2m$.


We have $\frac{(m^2+c)^2+1}{m^2+2}$ is an integer.

Note that $m^2+c\equiv c-2\pmod{m^2+2}$.

So $\frac{(c-2)^2+1}{m^2+2}$ is a positive integer.

Now, \[(c-2)^2+1\le (2m-2)^2+1=4m^2-8m+5<4m^2+8=4(m^2+2)\]
Since $(c-2)^2+1$ and $m^2+2$ are positive, we have \[\frac{(c-2)^2+1}{m^2+2}\in \{1,2,3\}\]
Case 1: $(c-2)^2+1=m^2+2$.
Then $m^2+1$ is a perfect square, which is not possible as $m>0$.

Case 2: $(c-2)^2+1=2m^2+4$.
Then $2m^2+3$ is a perfect square.

Note that $m^2\in \{0,1,4\}\pmod 8$, so $2m^2+3\in \{3,5\}\pmod 8$, both are not QR's.

Case 3: $(c-2)^2+1=3m^2+6$.
Then $3m^2+5$ is a perfect square. Clearly not possible as it is $2\pmod 3$.

We have exhausted all cases, so we are done.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Iora
194 posts
#28 • 3 Y
Y by Mango247, Mango247, Mango247
I claim that there are no such solutions.
In order to remove not so beautifull integer function, let $n=a^2+b$ where $ 0 \le b \le 2a$. Our question turns into
$$ \frac{a^4+b^2+2a^2b+1}{a^2+2}  \in \mathbb{Z}$$Long division yields
$$A= \frac{ b^2-4b+5}{a^2+2} \in \mathbb{Z}$$Since $b \le 2a$, the maximum value our expression can get is
$$ \frac{ 4a^2-8a+5}{a^2+2}= \frac{ 4a^2+8-8a-3}{a^2+2}= 4 - \frac{8a+3}{a^2+2} \in \{1,2,3 \}$$Hence we will divide into cases

\begin{align*}
     & \text{if} \ A=1 :  b^2-4b+5=a^2+2 \Rightarrow (b-2-a)(b-2+a)=1 \Rightarrow \ \text{ no solutions} \\
     & \text{if} \ A=2:  b^2-4b+5=2a^2+4 \Rightarrow  (b^2-2)^2-2a^2=3, \ \text{taking $\mod 8$, no solutions} \\
     & \text{if} \ A=3: b^2-4b+5=3a^2+6 \Rightarrow (b^2-2)^2-3a^2=5 \ \text{ taking $\mod 3$, no solutions}
 \end{align*}Hence we have proven our claim, therefore we are done.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
asdf334
7585 posts
#29
Y by
Let $n=a^2+r$ with $0\le r\le 2a$; note that $a\ge 1$. Clearly we obtain
\[a^2+2\mid (r-2)^2+1\]and by bounding we obtain either
\[(r-2)^2=a^2+1\]\[(r-2)^2=2a^2+3\]\[(r-2)^2=3a^2+5\]and the first equation fails by DOS, the second by noting that we must have $3\mid a$ implying that $\nu_3(2a^2+3)=1$, and the third by simply taking $\pmod 3$. We are done. $\blacksquare$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
cj13609517288
1919 posts
#30
Y by
The answer is that no $n$ works.

If $x=\left\lfloor\sqrt n\right\rfloor$, then $x^2\le n\le x^2+2x$. Let $n=x^2+r$, then
\[\frac{n^2+1}{\left\lfloor\sqrt n\right\rfloor^2+2}=\frac{(x^2+r)^2+1}{x^2+2}\rightarrow x^2+2\mid (r-2)^2+1.\]
But $(r-2)^2+1<4(x^2+2)$, so
\[\frac{(r-2)^2+1}{x^2+2}\in\{1,2,3\}.\]
Case 1. It is $1$. Then $(r-2)^2=x^2+1$, so $(r-2-x)(r-2+x)=1$. So $r-2-x=r-2+x$, so $x=0$, absurd as $n$ is positive.
Case 2. It is $2$. Then $(r-2)^2=2x^2+3$, but taking mod $8$ yields a contradiction.
Case 3. It is $3$. Then $(r-2)^2=3x^2+5$, but taking mod $3$ yields a contradiction.

As we have reached a contradiction in all cases, we are done.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Pyramix
419 posts
#31
Y by
We show that there are no such $n$.

Let $[\sqrt{n}]=k$. Then, $n=k^2+l$ where $0\leq l\leq2k\Longrightarrow n^2=k^4+2k^2l+l^2$
Then, $(k^2+2)\mid(k^4+2k^2l+l^2+1)\Longrightarrow(k^2+2)\mid(l^2-4l+5)$
$$\Longrightarrow1+(l-2)^2=m(k^2+2)$$Note that $m\geq1$ and $1+(l-2)^2\leq1+(2k-2)^2=m(k^2+2)=4k^2-8k+5<4(k^2+2)$
So, $m\in\{1,2,3\}$.
For $m=1$, we get $1+(l-2)^2=k^2+2$ which yields no solutions.
For $m=2$, we get $1+(l-2)^2=2k^2+4\Longrightarrow(l-2)^2-2k^2=3$. But $2k^2\equiv0,2\pmod{8}\Longrightarrow(l-2)^2\equiv3,5\pmod{8}$, a contradiction as $(l-2)^2\equiv0,1,4\pmod{8}$.
For $m=3$, we get $1+(l-2)^2=3k^2+6\Longrightarrow(l-2)^2\equiv2\pmod{3}$ which is impossible as $(l-2)^2\equiv0,1\pmod{3}$. Therefore, there are no solutions.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
john0512
4187 posts
#32
Y by
We claim that there are no solutions.

Claim 1: The equation $a^2-2b^2=3$ has no integer solutions. $a^2$ is either 0 or 1 mod 3, and $-2b^2\equiv b^2$ is also either 0 or 1 mod 3. For the total to be a multiple of 3, both have to be 0 mod 3, so $a$ and $b$ are both multiplies of 3, so the LHS is a multiple of 9, contradiction.

Claim 2: The equation $a^2-3b^2=5$ has no integer solutions. $a^2$ is either 0, 1, or 4 mod 5, and $-3b^2\equiv 2b^2$ is either 0, 2, or 3 mod 5. The only way for the total to be 0 mod 5 is if both $a$ and $b$ are multiples of 5, so the LHS is a multiple of 25, contradiction.

The equation is clearly not true for $n=1,2,3$. From now on, suppose $n\geq 4$. Suppose that $n=k^2+s$ for a positive integer $k\geq 2$ and nonnegative integer $s$ such that $s\leq 2k$ (essentially make $k$ as large as possible). Then, $$\frac{n^2+1}{\lfloor \sqrt{n}\rfloor ^2+2}=\frac{(k^2+s)^2+1}{k^2+2}=(k^2+2s-2)+\frac{s^2-4s+5}{k^2+2}.$$Thus, $$s^2-4s+5\equiv 0\pmod{k^2+2}$$$$(s-2)^2\equiv -1\pmod{k^2+2}.$$Then, note that $$(s-2)^2\leq (2k-2)^2<4k^2<4k^2+7,$$so we must have one of $$(s-2)^2=k^2+1$$$$(s-2)^2=2k^2+3$$$$(s-2)^2=3k^2+5.$$The first one clearly cannot happen as a positive square plus 1 is never a square, while the other two cannot happen by Claims 1 and 2, so we are done.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
andyxpandy99
365 posts
#33
Y by
There are no solutions. The key idea is to let $n = m^2+k$ where $0 \leq k \leq 2m$. Note that this implies that $\lfloor\sqrt{n}\rfloor = m$. Note that we require $$m^2+2 \mid n^2+1 = (m^2+k)^2+1$$Note that we can rewrite this as $$(m^2+k)^2+1 \equiv 0 \pmod {m^2+2}$$Equivalently, $$(k-2)^2+1 \equiv 0 \pmod {m^2+2}$$so we are left with $$m^2+2 \mid (k-2)^2+1$$
The key observation is that $4(m^2+2) > (2m-2)^2+1 \geq (k-2)^2+1$. This is trivial to prove. It suffices to check three cases.

Case 1: $(k-2)^2+1 = m^2+2$

Difference of squares gives us $(k-2+m)(k-2-m) = 1$ from which we get $k-2-m = 1$ and $k-2+m = 1$. This yields that $m = 0$ so there are no solutions.

Case 2: $(k-2)^2+1 = 2(m^2+2)$.

Rearranging yields $(k-2)^2 = 2m^2+3$. We will prove that $2m^2+3$ cannot be a square. Note that if $3 \nmid m$ then $2m^2+3 \equiv 2 \pmod 3$ which is bad. So let $m = 3c$ such that $2m^2+3 = 18c^2+3 = 3(6c^2+1)$. However, this means that $3 \mid 6c^2+1$ which is clearly false. Therefore, $2m^2+3$ cannot be a square and there are no solutions for this case.

Case 3: $(k-2)^2+1 = 3(m^2+2)$.

Rearranging yields $(k-2)^2 = 3m^2+5$. Note that since $3m^2+5 \equiv 2 \pmod 3$ we know that $3m^2+5$ cannot be a square and there are no solutions in this case.

We've exhausted all cases and shown that there are no solutions.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
huashiliao2020
1292 posts
#34
Y by
Let $n = m^2 + k$ s.t. m is maximal but k stays a positive integer; we want \[\frac{(m^2+k)^2+1}{m^2+2} = m^2 + (2k-2) + \frac{(k-2)^2+1}{m^2+2}\in\mathbb{Z}.\]Since $(k-2)^2 + 1 < 4m^2 + 8$, we only need to compute if the fraction equals 1,2,3.

Case 1. $(k-2)^2+1 = m^2+2\rightarrow(k-2)^2 = m^2+1$, which is impossible unless $m=0\rightarrow n=0$, contradiction.
Case 2. $(k-2)^2+1 = 2m^2+4\rightarrow (k-2)^2 + m^2 \equiv 0 \pmod{3}\implies k-2 \equiv m \equiv 0 \pmod{3}\implies 9 \mid (k-2)^2 - 2m^2 = 3$, contradiction.
Case 3. $(k-2)^2 + 1 = 3m^2 + 6\rightarrow(k-2)^2 \equiv 2 \pmod{3}$, contradiction. We've exhausted all cases, so there is no solution for such n.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
thdnder
198 posts
#35
Y by
This is so boring problem.
Answer: There is no such $n$.

Let $x = \left\lfloor \sqrt n \right\rfloor$, and let $y = n - x^2$. Then the condition becomes $\frac{(x^2 + y)^2 + 1}{x^2 + 2}$ is an integer and $y \le 2x$. Thus $x^2 + 2 \mid (y - 2)^2 + 1$. Since $(y - 2)^2 + 1 < (2x - 2)^2 + 1 < 4x^2 + 8$, so $\frac{(y - 2)^2}{x^2 + 2} \in \{1, 2, 3\}$.

If $3(x^2 + 2) = (y - 2)^2 + 1$, then $3 \mid (y - 2)^2 + 1$, a contradiction.

If $2(x^2 + 2) = (y - 2)^2 + 1$, then $2x^2 + 3 = (y - 2)^2$. So taking mod 3 forces $3 \mid x , (y - 2)$. Then taking mod 9 gives $9 \mid 3$, a contradiction.

If $(x^2 + 2) = (y - 2)^2 + 1$, then $x^2 + 1 = (y - 2)^2$, so $x = 0$ and $y = 3$. This contradicts $y \le 2x$.

This completes proof. $\blacksquare$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
YaoAOPS
1541 posts
#36
Y by
Let $n = k^2 + m$ for $0 \le m \le 2k$. This then becomes \[ \frac{(k^2 + m)^2 + 1}{k^2 + 2} = \frac{k^4 + 2k^2m + m^2 + 1}{k^2 + 2} = k^2 - 2 + 2m + \frac{m^2 - 4m + 5}{k^2 + 2} \]This implies that $t(k^2 + 2) = m^2 - 4m + 5$ for $t \in \{1, 2, 3\}$.
If $k^2 + 2 = (m - 2)^2 + 1$, then $(k, m) = (0, 3)$, which is invalid.
If $2k^2 + 4 = (m - 2)^2 + 1$, taking $\pmod{8}$ gives no solutions. If $3k^2 + 6 = (m - 2)^2 + 1$, taking $\pmod{3}$ gives no solutions.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
HamstPan38825
8866 posts
#37
Y by
No such $n$ exist. Let $\lfloor \sqrt n \rfloor = k$ and set $n = k^2+r$, where $r \leq 2k$. The divisibility condition $$k^2+2 \mid (k^2+r)^2 + 1 \iff k^2+2 \mid r^2-4r+5$$after some reduction. In particular, this implies that $$r^2-4r+5 \in \{k^2+2, 2k^2+4, 3k^2+6\}.$$
If $r^2-4r+5=k^2+2$, then $k^2+1$ must be a square, which is impossible.

If $r^2 -4r + 5 = 2k^2+4$, then $2k^2+3$ must be a square, which is impossible by mod $8$.

If $r^2-4r + 5 = 3k^2+6$, then $3k^2+5$ must be a square, which is impossible by mod $3$.

Thus there are no valid pairs $(r, k)$ and thus no valid $n$.
This post has been edited 1 time. Last edited by HamstPan38825, Dec 16, 2023, 8:05 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
kamatadu
480 posts
#38
Y by
This problem is so annoying that you have to do nothing else apart from doing some hell lot of bounding stuff (at least that is what I did in the way I solved it). Please let me know if there are any calculation mistakes since it is my nature to make sillies in all possible ways.

I claim that there does not exist any such $n$.

Let $k^2 \le n < (k+1)^2$. Then using the floor function inequalities, we get,
\[ \dfrac{k^4+1}{k^2 + 2}\le \dfrac{n^2 + 1}{k^2 + 2} \le \dfrac{(k+1)^4 + 1}{k^2 + 2}. \]
Now we have that $\dfrac{k^4+1}{k^2+2}=k^2 - 2 + \dfrac{5}{k^2+2} > k^2 -2$. This gives us that $\dfrac{n^2 + 1}{k^2 + 2} \ge k^2 - 1$. Also, we have that $\dfrac{(k+1)^2 + 1}{k^2 + 2} = k^2 + 4k + 4 - \dfrac{4k+6}{k^2+2} < k^2 + 4k + 4$. This gives us $\dfrac{n^2 + 1}{k^2 + 2} \le k^2 + 4k + 3$. Combining these two bounds, we get,
\[ k^2 - 1 \le \dfrac{n^2 + 1}{k^2 + 2} \le k^2 + 4k + 3. \]
Thus we get $(k^2-1)(k^2+2) - 1 \le n^2 \le (k^2+4k+3)(k^2+2) - 1$, that is $k^4 + k^2 -3 \le n^2 \le k^4 + 4k^3 + 5k^2 + 8k + 5$. Now we first need to find all the set of possible perfect squares in the interval $[k^4 + k^2 -3, k^4 + 4k^3 + 5k^2 + 8k + 5]$. Now we can note that all the perfect squares in this range are $\left\{(k^2+1)^2, (k^2+2)^2, \ldots, (k^2 + 2k + 2)^2\right\}$. This gives us that $n\in \left\{k^2+1,k^2+2,\ldots, k^2+2k+2\right\}$.

Now we denote $n$ as $(k^2 + i)$ where $1 \le i \le 2k+2$. Since $\dfrac{n^2 + 1}{k^2 + 2}$ is an integer, we get that $k^2 + 2\mid n^2 + 1$, that is,
\[ k^2 + 2 \mid (k^2 + i)^2 + 1 \equiv (-2 + i)^2 + 1. \]
Now note that $1 \le (i-2)^2 + 1 \le 4k^2 + 1$ which gives that the only possible values for $(i-2)^2 + 1$ are $\left\{k^2+2,2k^2+4,3k^2+6\right\}$. Now among these possibilities, $(i-2)^2 + 1 = 2k^2 + 4$ fails due to $\mod 8$. Also, $(i-2)^2 + 1 = 3k^2 + 6$ fails due to $\mod 3$.

Thus we must have $(i-2)^2 + 1 = k^2 + 2 \implies (i-2+k)(i-2-k) = 1$. This is only possible if $k = 0$. So now we are working with $0^2 \le n < 1^2$ which forces $n=0$, contradiction as $n$ was a positive integer.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Inconsistent
1455 posts
#39
Y by
The answer is there is no such $n$. Suppose otherwise, then $n = k^2 + s$ where $0 \leq s < 2k + 1$ and $k = \lfloor \sqrt{n} \rfloor$.

Now we have $\frac{(k^2+s)^2 + 1}{k^2 + 2} \in \mathbb{Z}$, so by plugging in $k^2 = -2$ (i.e. long division), we have:

$\frac{(s-2)^2 + 1}{k^2 + 2} \in \mathbb{Z}$.

Now notice we must have: $(s-2)^2 = k^2 +1, 2k^2 + 3, 3k^2 + 5$, since the numerator is positive and $4k^2 + 7 > 4k^2-4k + 1 \geq (s-2)^2$. These cases each fail by $k \geq 1$, modulo $8$, modulo $3$ respectively, so there are no solutions.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
shendrew7
796 posts
#40
Y by
Let $n=a^2+b$, where $0 \leq b \leq 2a$. Then $a^2+2$ must divide
\[a^4+2a^2b+b^2+1 \implies 2a^2b-2a^2+b^2+1 \implies b^2-4b+5.\]
Due to our bound on $b$, we require $\frac{b^2-4b+5}{a^2+2} \in \{1,2,3\}$, which gives the solutions
\[b = \sqrt{2a^2+3}+2, \quad \sqrt{3a^2+5}+2.\]
Testing modulo 3, neither solutions are integers, giving us $\boxed{\text{no solutions}}$. $\blacksquare$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
lifeismathematics
1188 posts
#41
Y by
set $\lfloor \sqrt{n} \rfloor :=k$

so we have $k^2 \leqslant n < (k+1)^2$ , so we have $n:=k^2+t$ where $0 \leqslant t<2k$we have:

$\frac{n^2+1}{(\lfloor \sqrt{n} \rfloor)^2+2}=\frac{k^4+t^2+2k^2t+1}{k^2+2} \in \mathbb{N} \implies \frac{t^2+5-4t}{k^2+2} \in \mathbb{N}$

now we have the bound:

$\frac{2}{k^2+2} \leqslant \frac{(t-2)^2+1}{k^2+2} \leqslant \frac{4k^2+5-8k}{k^2+2}<4$

so we just need to check for $\frac{(t-2)^2+1}{k^2+2} \in \{1,2,3\}$

so we just check that $(t-2)^2=k^2+1,2k^2+3,3k^2+5$ has no solutions , and so no such $n$ works. $\square$
This post has been edited 1 time. Last edited by lifeismathematics, Apr 25, 2024, 5:34 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
bjump
1029 posts
#42
Y by
solution
This post has been edited 1 time. Last edited by bjump, May 5, 2024, 12:53 PM
Reason: forgot somth
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
RedFireTruck
4223 posts
#43
Y by
Let $n=k^2+a$ where $0\le a\le 2k$ and $k>0$. Then we want $$\frac{(k^2+a)^2+1}{k^2+2}=\frac{k^4+2ak^2+a^2+1}{k^2+2}$$to be an integer. Subtracting $k^2+2a-2$ means we want $\frac{a^2-4a+5}{k^2+2}=\frac{(a-2)^2+1}{k^2+2}$ to be an integer. Since $0\le a\le 2k$, we must have that the fraction is $1$, $2$, or $3$.

$(a-2)^2+1=k^2+2$ gives $(a-2-k)(a-2+k)=1$, which is not possible.

$(a-2)^2+1=2k^2+4$ gives $(a-2)^2=2k^2+3$. Since squares are never $2\pmod{3}$, let $k=3j$ and $a-2=3b$. Then, $9b^2=18j^2+3$ so $3b^2=6j^2+1$. This is clearly not possible because $3\not|1$.

$(a-2)^2+1=3k^2+6$ gives $(a-2)^2=3k^2+5$. Since perfect squares are $0,\pm1\pmod{5}$, let $k=5j$ and $a-2=5b$. Then $25b^2=75j^2+5$ so $5b^2=15j^2+1$. This is clearly not possible because $5\not|1$.

Therefore, there are no solutions for $n$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
pie854
243 posts
#44
Y by
Let $\lfloor \sqrt n \rfloor=t$ and $r$ be such that $0\leq r< 2t+1$ and $n=r+t^2$. Now we have $$t^2+2 \mid (r+t^2)^2+1 \implies t^2+2\mid (r-2)^2+1.$$Note that $4(t^2+1)>(2t)^2+1>(r-2)^2+1$. If $3(t^2+2)=(r-2)^2+1$ or $2(t^2+2)=(r-2)^2+1$ then $\pmod 3$ and $\pmod 8$, respectively, yield contradictions. If $t^2+2=(r-2)^2+1$ then $t=0, r=3$ which is not possible. Thus no solutions exist.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Ilikeminecraft
643 posts
#45
Y by
Let $n = a^2 + k$ such that $k < 2a + 1$(so that $\lfloor{\sqrt n}\rfloor = a$). We have that:
\begin{align*}
  \frac{(a^2 +k)^2 + 1}{a^2 + 2} & = \frac{(k - 2)^2 + 1}{a^2 + 2}
\end{align*}However, since $k < 2a + 1,$ we have that $(k - 2)^2 + 1 < 4a^2 - 4a + 2 < 4(a^2 + 2).$ Hence, we have that $\frac{(k - 2)^2 + 1}{a^2 + 2} = 3, 2, 1.$

\begin{enumerate}
\item If it is 1, we have that $(k - 2)^2 + 1 = a^2 + 2,$ and by difference of squares, $(k - a - 2)(k + a - 2) = 1.$ Hence, $k= 3, a = 0, k = 1, a = 0.$ However, neither of these satisfy $k < 2a + 1.$
\item If it is $2,$ we have that $(k - 2)^2 + 1 = 2(a^2 + 2).$ Hence, $(k - 2)^2- 2a^2 = 3.$ By taking modulo 8, this is impossible.
\item If it is $3,$ we have that $(k - 2)^2 + 1 = 3(a^2 + 2).$ Hence, $(k - 2)^2 - 3a^2 = 5.$ By taking modulo 3, this is impossible.
\end{enumerate}
Z K Y
N Quick Reply
G
H
=
a