Summer is a great time to explore cool problems to keep your skills sharp!  Schedule a class today!

G
Topic
First Poster
Last Poster
k a June Highlights and 2025 AoPS Online Class Information
jlacosta   0
Jun 2, 2025
Congratulations to all the mathletes who competed at National MATHCOUNTS! If you missed the exciting Countdown Round, you can watch the video at this link. Are you interested in training for MATHCOUNTS or AMC 10 contests? How would you like to train for these math competitions in half the time? We have accelerated sections which meet twice per week instead of once starting on July 8th (7:30pm ET). These sections fill quickly so enroll today!

[list][*]MATHCOUNTS/AMC 8 Basics
[*]MATHCOUNTS/AMC 8 Advanced
[*]AMC 10 Problem Series[/list]
For those interested in Olympiad level training in math, computer science, physics, and chemistry, be sure to enroll in our WOOT courses before August 19th to take advantage of early bird pricing!

Summer camps are starting this 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 a transformative 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][*]June 5th, Thursday, 7:30pm ET: Open Discussion with Ben Kornell and Andrew Sutherland, Art of Problem Solving's incoming CEO Ben Kornell and CPO Andrew Sutherland host an Ask Me Anything-style chat. Come ask your questions and get to know our incoming CEO & CPO!
[*]June 9th, Monday, 7:30pm ET, Game Jam: Operation Shuffle!, Come join us to play our second round of Operation Shuffle! If you enjoy number sense, logic, and a healthy dose of luck, this is the game for you. No specific math background is required; all are welcome.[/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
Sunday, Jun 15 - Oct 12
Monday, Jun 30 - Oct 20
Wednesday, Jul 16 - Oct 29
Sunday, Aug 17 - Dec 14
Tuesday, Aug 26 - Dec 16
Friday, Sep 5 - Jan 16
Monday, Sep 8 - Jan 12
Tuesday, Sep 16 - Jan 20 (4:30 - 5:45 pm ET/1:30 - 2:45 pm PT)
Sunday, Sep 21 - Jan 25
Thursday, Sep 25 - Jan 29
Wednesday, Oct 22 - Feb 25
Tuesday, Nov 4 - Mar 10
Friday, Dec 12 - Apr 10

Prealgebra 2 Self-Paced

Prealgebra 2
Monday, Jun 2 - Sep 22
Sunday, Jun 29 - Oct 26
Friday, Jul 25 - Nov 21
Sunday, Aug 17 - Dec 14
Tuesday, Sep 9 - Jan 13
Thursday, Sep 25 - Jan 29
Sunday, Oct 19 - Feb 22
Monday, Oct 27 - Mar 2
Wednesday, Nov 12 - Mar 18

Introduction to Algebra A Self-Paced

Introduction to Algebra A
Sunday, Jun 15 - Oct 12
Thursday, Jun 26 - Oct 9
Tuesday, Jul 15 - Oct 28
Sunday, Aug 17 - Dec 14
Wednesday, Aug 27 - Dec 17
Friday, Sep 5 - Jan 16
Thursday, Sep 11 - Jan 15
Sunday, Sep 28 - Feb 1
Monday, Oct 6 - Feb 9
Tuesday, Oct 21 - Feb 24
Sunday, Nov 9 - Mar 15
Friday, Dec 5 - Apr 3

Introduction to Counting & Probability Self-Paced

Introduction to Counting & Probability
Sunday, Jun 1 - Aug 24
Thursday, Jun 12 - Aug 28
Wednesday, Jul 2 - Sep 17
Sunday, Jul 27 - Oct 19
Monday, Aug 11 - Nov 3
Wednesday, Sep 3 - Nov 19
Sunday, Sep 21 - Dec 14 (1:00 - 2:30 pm ET/10:00 - 11:30 am PT)
Friday, Oct 3 - Jan 16
Tuesday, Nov 4 - Feb 10
Sunday, Dec 7 - Mar 8

Introduction to Number Theory
Monday, Jun 9 - Aug 25
Sunday, Jun 15 - Sep 14
Tuesday, Jul 15 - Sep 30
Wednesday, Aug 13 - Oct 29
Friday, Sep 12 - Dec 12
Sunday, Oct 26 - Feb 1
Monday, Dec 1 - Mar 2

Introduction to Algebra B Self-Paced

Introduction to Algebra B
Wednesday, Jun 4 - Sep 17
Sunday, Jun 22 - Oct 19
Friday, Jul 18 - Nov 14
Thursday, Aug 7 - Nov 20
Monday, Aug 18 - Dec 15
Sunday, Sep 7 - Jan 11
Thursday, Sep 11 - Jan 15
Wednesday, Sep 24 - Jan 28
Sunday, Oct 26 - Mar 1
Tuesday, Nov 4 - Mar 10
Monday, Dec 1 - Mar 30

Introduction to Geometry
Monday, Jun 16 - Dec 8
Friday, Jun 20 - Jan 9
Sunday, Jun 29 - Jan 11
Monday, Jul 14 - Jan 19
Wednesday, Aug 13 - Feb 11
Tuesday, Aug 26 - Feb 24
Sunday, Sep 7 - Mar 8
Thursday, Sep 11 - Mar 12
Wednesday, Sep 24 - Mar 25
Sunday, Oct 26 - Apr 26
Monday, Nov 3 - May 4
Friday, Dec 5 - May 29

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
Friday, Aug 8 - Feb 20
Tuesday, Aug 26 - Feb 24
Sunday, Sep 28 - Mar 29
Wednesday, Oct 8 - Mar 8
Sunday, Nov 16 - May 17
Thursday, Dec 11 - Jun 4

Intermediate Counting & Probability
Sunday, Jun 22 - Nov 2
Sunday, Sep 28 - Feb 15
Tuesday, Nov 4 - Mar 24

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

Precalculus
Sunday, Jun 1 - Nov 9
Monday, Jun 30 - Dec 8
Wednesday, Aug 6 - Jan 21
Tuesday, Sep 9 - Feb 24
Sunday, Sep 21 - Mar 8
Monday, Oct 20 - Apr 6
Sunday, Dec 14 - May 31

Advanced: Grades 9-12

Olympiad Geometry
Tuesday, Jun 10 - Aug 26

Calculus
Wednesday, Jun 25 - Dec 17
Sunday, Sep 7 - Mar 15
Wednesday, Sep 24 - Apr 1
Friday, Nov 14 - May 22

Group Theory
Thursday, Jun 12 - Sep 11

Contest Preparation: Grades 6-12

MATHCOUNTS/AMC 8 Basics
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!)
Sunday, Aug 17 - Nov 9
Wednesday, Sep 3 - Nov 19
Tuesday, Sep 16 - Dec 9
Sunday, Sep 21 - Dec 14 (1:00 - 2:30 pm ET/10:00 - 11:30 am PT)
Monday, Oct 6 - Jan 12
Thursday, Oct 16 - Jan 22
Tues, Thurs & Sun, Dec 9 - Jan 18 (meets three times a week!)

MATHCOUNTS/AMC 8 Advanced
Wednesday, Jun 11 - Aug 27
Sunday, Jun 22 - Sep 21
Tues & Thurs, Jul 8 - Aug 14 (meets twice a week!)
Sunday, Aug 17 - Nov 9
Tuesday, Aug 26 - Nov 11
Thursday, Sep 4 - Nov 20
Friday, Sep 12 - Dec 12
Monday, Sep 15 - Dec 8
Sunday, Oct 5 - Jan 11
Tues, Thurs & Sun, Dec 2 - Jan 11 (meets three times a week!)
Mon, Wed & Fri, Dec 8 - Jan 16 (meets three times a week!)

AMC 10 Problem Series
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!)
Sunday, Aug 10 - Nov 2
Thursday, Aug 14 - Oct 30
Tuesday, Aug 19 - Nov 4
Mon & Wed, Sep 15 - Oct 22 (meets twice a week!)
Mon, Wed & Fri, Oct 6 - Nov 3 (meets three times a week!)
Tue, Thurs & Sun, Oct 7 - Nov 2 (meets three times a week!)

AMC 10 Final Fives
Monday, Jun 30 - Jul 21
Friday, Aug 15 - Sep 12
Sunday, Sep 7 - Sep 28
Tuesday, Sep 9 - Sep 30
Monday, Sep 22 - Oct 13
Sunday, Sep 28 - Oct 19 (1:00 - 2:30 pm ET/10:00 - 11:30 am PT)
Wednesday, Oct 8 - Oct 29
Thursday, Oct 9 - Oct 30

AMC 12 Problem Series
Thursday, Jun 12 - Aug 28
Sunday, Jun 22 - Sep 21
Wednesday, Aug 6 - Oct 22
Sunday, Aug 10 - Nov 2
Monday, Aug 18 - Nov 10
Mon & Wed, Sep 15 - Oct 22 (meets twice a week!)
Tues, Thurs & Sun, Oct 7 - Nov 2 (meets three times a week!)

AMC 12 Final Fives
Thursday, Sep 4 - Sep 25
Sunday, Sep 28 - Oct 19
Tuesday, Oct 7 - Oct 28

AIME Problem Series A
Thursday, Oct 23 - Jan 29

AIME Problem Series B
Sunday, Jun 22 - Sep 21
Tuesday, Sep 2 - Nov 18

F=ma Problem Series
Wednesday, Jun 11 - Aug 27
Tuesday, Sep 16 - Dec 9
Friday, Oct 17 - Jan 30

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
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
Thursday, Aug 14 - Oct 30
Sunday, Sep 7 - Nov 23
Tuesday, Dec 2 - Mar 3

Intermediate Programming with Python
Sunday, Jun 1 - Aug 24
Monday, Jun 30 - Sep 22
Friday, Oct 3 - Jan 16

USACO Bronze Problem Series
Sunday, Jun 22 - Sep 1
Wednesday, Sep 3 - Dec 3
Thursday, Oct 30 - Feb 5
Tuesday, Dec 2 - Mar 3

Physics

Introduction to Physics
Sunday, Jun 15 - Sep 14
Monday, Jun 23 - Sep 15
Tuesday, Sep 2 - Nov 18
Sunday, Oct 5 - Jan 11
Wednesday, Dec 10 - Mar 11

Physics 1: Mechanics
Monday, Jun 23 - Dec 15
Sunday, Sep 21 - Mar 22
Sunday, Oct 26 - Apr 26

Relativity
Mon, Tue, Wed & Thurs, Jun 23 - Jun 26 (meets every day of the week!)
0 replies
jlacosta
Jun 2, 2025
0 replies
Weirdly stated but cool collinearity
Rijul saini   3
N 6 minutes ago by YaoAOPS
Source: LMAO Revenge 2025 Day 1 Problem 2
Let Mary choose any non-degenerate $\triangle ABC$. Let $I$ be its incenter, $I_A$ be its $A$-excenter, $N_A$ be midpoint of arc $BAC$, $M$ is the midpoint of $BC$.

Let $H \neq I$ be the intersection of the line $N_AI$ with $(BIC)$, $F$ be the intersection of the angle bisector of $\angle BAC$ with the line $BC$.

Ana now draws the points $P \neq H$ ,the intersection of line $I_AH$ with $(HIN)$ and $Q$ ,the intersection of $(HIM)$ and $(AN_AI_A)$ such that $I_AH < I_AQ$. Ana wins if the points $A, P, Q$ are collinear. Who has a winning strategy?
3 replies
1 viewing
Rijul saini
Wednesday at 7:09 PM
YaoAOPS
6 minutes ago
ISI UGB 2025 P8
SomeonecoolLovesMaths   7
N 10 minutes ago by Ilovesumona
Source: ISI UGB 2025 P8
Let $n \geq 2$ and let $a_1 \leq a_2 \leq \cdots \leq a_n$ be positive integers such that $\sum_{i=1}^{n} a_i = \prod_{i=1}^{n} a_i$. Prove that $\sum_{i=1}^{n} a_i \leq 2n$ and determine when equality holds.
7 replies
+1 w
SomeonecoolLovesMaths
May 11, 2025
Ilovesumona
10 minutes ago
k colorings and triangles
Rijul saini   1
N 15 minutes ago by YaoAOPS
Source: LMAO Revenge 2025 Day 1 Problem 3
In the city of Timbuktu, there is an orphanage. It shelters children from the new mysterious disease that causes children to explode. There are m children in the orphanage. To try to cure this disease, a mad scientist named Myla has come up with an innovative cure. She ties every child to every other child using medicinal ropes. Every child is connected to every other child using one of $k$ different ropes. She then performs a experiment that causes $3$ children, each connected to each other with the same type of rope, to be cured. Two experiments are said to be of the same type, if each of the ropes connecting the children has the same medicine imbued in it. She then unties them and lets them go back home.

We let $f(n, k)$ be the minimum m such that Myla can perform at least $n$ experiments of the same type. Prove that:

$i.$ For every $k \in \mathbb N$ there exists a $N_k \in N$ and $a_k, b_k \in \mathbb Z$ such that for all $n > N_k$, \[f(n, k) = a_kn + b_k.\]
$ii.$ Find the value of $a_k$ for every $k \in \mathbb N$.
1 reply
1 viewing
Rijul saini
Wednesday at 7:11 PM
YaoAOPS
15 minutes ago
A beautiful Lemoine point problem
phonghatemath   2
N 24 minutes ago by HyperDunteR
Source: my teacher
Given triangle $ABC$ inscribed in a circle with center $O$. $P$ is any point not on (O). $AP, BP, CP$ intersect $(O)$ at $A', B', C'$. Let $L, L'$ be the Lemoine points of triangle $ABC, A'B'C'$ respectively. Prove that $P, L, L'$ are collinear.
2 replies
phonghatemath
3 hours ago
HyperDunteR
24 minutes 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
6882 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
6882 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
6882 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
274 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
5005 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
1562 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
11395 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
1611 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
7357 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
5610 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
1930 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
4191 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
1551 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
8881 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
481 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
808 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
1051 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
4260 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
246 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
685 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