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
k i Adding contests to the Contest Collections
dcouchman   1
N Apr 5, 2023 by v_Enhance
Want to help AoPS remain a valuable Olympiad resource? Help us add contests to AoPS's Contest Collections.

Find instructions and a list of contests to add here: https://artofproblemsolving.com/community/c40244h1064480_contests_to_add
1 reply
dcouchman
Sep 9, 2019
v_Enhance
Apr 5, 2023
k i Zero tolerance
ZetaX   49
N May 4, 2019 by NoDealsHere
Source: Use your common sense! (enough is enough)
Some users don't want to learn, some other simply ignore advises.
But please follow the following guideline:


To make it short: ALWAYS USE YOUR COMMON SENSE IF POSTING!
If you don't have common sense, don't post.


More specifically:

For new threads:


a) Good, meaningful title:
The title has to say what the problem is about in best way possible.
If that title occured already, it's definitely bad. And contest names aren't good either.
That's in fact a requirement for being able to search old problems.

Examples:
Bad titles:
- "Hard"/"Medium"/"Easy" (if you find it so cool how hard/easy it is, tell it in the post and use a title that tells us the problem)
- "Number Theory" (hey guy, guess why this forum's named that way¿ and is it the only such problem on earth¿)
- "Fibonacci" (there are millions of Fibonacci problems out there, all posted and named the same...)
- "Chinese TST 2003" (does this say anything about the problem¿)
Good titles:
- "On divisors of a³+2b³+4c³-6abc"
- "Number of solutions to x²+y²=6z²"
- "Fibonacci numbers are never squares"


b) Use search function:
Before posting a "new" problem spend at least two, better five, minutes to look if this problem was posted before. If it was, don't repost it. If you have anything important to say on topic, post it in one of the older threads.
If the thread is locked cause of this, use search function.

Update (by Amir Hossein). The best way to search for two keywords in AoPS is to input
[code]+"first keyword" +"second keyword"[/code]
so that any post containing both strings "first word" and "second form".


c) Good problem statement:
Some recent really bad post was:
[quote]$lim_{n\to 1}^{+\infty}\frac{1}{n}-lnn$[/quote]
It contains no question and no answer.
If you do this, too, you are on the best way to get your thread deleted. Write everything clearly, define where your variables come from (and define the "natural" numbers if used). Additionally read your post at least twice before submitting. After you sent it, read it again and use the Edit-Button if necessary to correct errors.


For answers to already existing threads:


d) Of any interest and with content:
Don't post things that are more trivial than completely obvious. For example, if the question is to solve $x^{3}+y^{3}=z^{3}$, do not answer with "$x=y=z=0$ is a solution" only. Either you post any kind of proof or at least something unexpected (like "$x=1337, y=481, z=42$ is the smallest solution). Someone that does not see that $x=y=z=0$ is a solution of the above without your post is completely wrong here, this is an IMO-level forum.
Similar, posting "I have solved this problem" but not posting anything else is not welcome; it even looks that you just want to show off what a genius you are.

e) Well written and checked answers:
Like c) for new threads, check your solutions at least twice for mistakes. And after sending, read it again and use the Edit-Button if necessary to correct errors.



To repeat it: ALWAYS USE YOUR COMMON SENSE IF POSTING!


Everything definitely out of range of common sense will be locked or deleted (exept for new users having less than about 42 posts, they are newbies and need/get some time to learn).

The above rules will be applied from next monday (5. march of 2007).
Feel free to discuss on this here.
49 replies
ZetaX
Feb 27, 2007
NoDealsHere
May 4, 2019
Permutations of Integers from 1 to n
Twoisntawholenumber   75
N 2 minutes ago by SYBARUPEMULA
Source: 2020 ISL C1
Let $n$ be a positive integer. Find the number of permutations $a_1$, $a_2$, $\dots a_n$ of the
sequence $1$, $2$, $\dots$ , $n$ satisfying
$$a_1 \le 2a_2\le 3a_3 \le \dots \le na_n$$.

Proposed by United Kingdom
75 replies
Twoisntawholenumber
Jul 20, 2021
SYBARUPEMULA
2 minutes ago
Again
heartwork   11
N 23 minutes ago by Mathandski
Source: Vietnam MO 2002, Problem 5
Determine for which $ n$ positive integer the equation: $ a + b + c + d = n \sqrt {abcd}$ has positive integer solutions.
11 replies
heartwork
Dec 16, 2004
Mathandski
23 minutes ago
Cono Sur Olympiad 2011, Problem 3
Leicich   5
N 24 minutes ago by Thelink_20
Let $ABC$ be an equilateral triangle. Let $P$ be a point inside of it such that the square root of the distance of $P$ to one of the sides is equal to the sum of the square roots of the distances of $P$ to the other two sides. Find the geometric place of $P$.
5 replies
Leicich
Aug 23, 2014
Thelink_20
24 minutes ago
IMO Genre Predictions
ohiorizzler1434   69
N 27 minutes ago by whwlqkd
Everybody, with IMO upcoming, what are you predictions for the problem genres?


Personally I predict: predict
69 replies
ohiorizzler1434
May 3, 2025
whwlqkd
27 minutes ago
Central sequences
EeEeRUT   11
N 30 minutes ago by jonh_malkovich
Source: EGMO 2025 P2
An infinite increasing sequence $a_1 < a_2 < a_3 < \cdots$ of positive integers is called central if for every positive integer $n$ , the arithmetic mean of the first $a_n$ terms of the sequence is equal to $a_n$.

Show that there exists an infinite sequence $b_1, b_2, b_3, \dots$ of positive integers such that for every central sequence $a_1, a_2, a_3, \dots, $ there are infinitely many positive integers $n$ with $a_n = b_n$.
11 replies
EeEeRUT
Apr 16, 2025
jonh_malkovich
30 minutes ago
geometry problem
kjhgyuio   2
N 39 minutes ago by ricarlos
........
2 replies
kjhgyuio
May 11, 2025
ricarlos
39 minutes ago
Sequence inequality
hxtung   20
N an hour ago by awesomeming327.
Source: IMO ShortList 2003, algebra problem 6
Let $n$ be a positive integer and let $(x_1,\ldots,x_n)$, $(y_1,\ldots,y_n)$ be two sequences of positive real numbers. Suppose $(z_2,\ldots,z_{2n})$ is a sequence of positive real numbers such that $z_{i+j}^2 \geq x_iy_j$ for all $1\le i,j \leq n$.

Let $M=\max\{z_2,\ldots,z_{2n}\}$. Prove that \[
	\left( \frac{M+z_2+\dots+z_{2n}}{2n} \right)^2
	\ge
	\left( \frac{x_1+\dots+x_n}{n} \right)
	\left( \frac{y_1+\dots+y_n}{n} \right). \]

comment

Proposed by Reid Barton, USA
20 replies
hxtung
Jun 9, 2004
awesomeming327.
an hour ago
I guess a very hard function?
Mr.C   20
N an hour ago by jasperE3
Source: A hand out
Find all functions from the reals to it self such that
$f(x)(f(y)+f(f(x)-y))=x^2$
20 replies
Mr.C
Mar 19, 2020
jasperE3
an hour ago
Concurrency from symmetric points on the sides of a triangle
MathMystic33   1
N 2 hours ago by MathLuis
Source: 2024 Macedonian Team Selection Test P3
Let $\triangle ABC$ be a triangle. On side $AB$ take points $K$ and $L$ such that $AK \;=\; LB \;<\;\tfrac12\,AB,$
on side $BC$ take points $M$ and $N$ such that $BM \;=\; NC \;<\;\tfrac12\,BC,$ and on side $CA$ take points $P$ and $Q$ such that $CP \;=\; QA \;<\;\tfrac12\,CA.$ Let $R \;=\; KN\;\cap\;MQ,
\quad
T \;=\; KN \cap LP, $ and $ D \;=\; NP \cap LM, \quad
E \;=\; NP \cap KQ.$
Prove that the lines $DR, BE, CT$ are concurrent.
1 reply
MathMystic33
May 13, 2025
MathLuis
2 hours ago
Nice original fe
Rayanelba   10
N 2 hours ago by GreekIdiot
Source: Original
Find all functions $f: \mathbb{R}_{>0} \to \mathbb{R}_{>0}$ that verify the following equation :
$P(x,y):f(x+yf(x))+f(f(x))=f(xy)+2x$
10 replies
Rayanelba
Thursday at 12:37 PM
GreekIdiot
2 hours ago
Collinearity of intersection points in a triangle
MathMystic33   3
N 2 hours ago by ariopro1387
Source: 2025 Macedonian Team Selection Test P1
On the sides of the triangle \(\triangle ABC\) lie the following points: \(K\) and \(L\) on \(AB\), \(M\) on \(BC\), and \(N\) on \(CA\). Let
\[
P = AM\cap BN,\quad
R = KM\cap LN,\quad
S = KN\cap LM,
\]and let the line \(CS\) meet \(AB\) at \(Q\). Prove that the points \(P\), \(Q\), and \(R\) are collinear.
3 replies
MathMystic33
May 13, 2025
ariopro1387
2 hours ago
My Unsolved Problem
MinhDucDangCHL2000   3
N 3 hours ago by GreekIdiot
Source: 2024 HSGS Olympiad
Let triangle $ABC$ be inscribed in the circle $(O)$. A line through point $O$ intersects $AC$ and $AB$ at points $E$ and $F$, respectively. Let $P$ be the reflection of $E$ across the midpoint of $AC$, and $Q$ be the reflection of $F$ across the midpoint of $AB$. Prove that:
a) the reflection of the orthocenter $H$ of triangle $ABC$ across line $PQ$ lies on the circle $(O)$.
b) the orthocenters of triangles $AEF$ and $HPQ$ coincide.

Im looking for a solution used complex bashing :(
3 replies
MinhDucDangCHL2000
Apr 29, 2025
GreekIdiot
3 hours ago
Classical triangle geometry
Valentin Vornicu   11
N 3 hours ago by HormigaCebolla
Source: Kazakhstan international contest 2006, Problem 2
Let $ ABC$ be a triangle and $ K$ and $ L$ be two points on $ (AB)$, $ (AC)$ such that $ BK = CL$ and let $ P = CK\cap BL$. Let the parallel through $ P$ to the interior angle bisector of $ \angle BAC$ intersect $ AC$ in $ M$. Prove that $ CM = AB$.
11 replies
Valentin Vornicu
Jan 22, 2006
HormigaCebolla
3 hours ago
Incircle in an isoscoles triangle
Sadigly   0
3 hours ago
Source: own
Let $ABC$ be an isosceles triangle with $AB=AC$, and let $I$ be its incenter. Incircle touches sides $BC,CA,AB$ at $D,E,F$, respectively. Foot of altitudes from $E,F$ to $BC$ are $X,Y$ , respectively. Rays $XI,YI$ intersect $(ABC)$ at $P,Q$, respectively. Prove that $(PQD)$ touches incircle at $D$.
0 replies
Sadigly
3 hours ago
0 replies
Quadratic residues in a given interval
cyshine   22
N Apr 26, 2025 by Ilikeminecraft
Source: Brazilian Math Olympiad, Problem 2
Find the number of integers $ c$ such that $ -2007 \leq c \leq 2007$ and there exists an integer $ x$ such that $ x^2 + c$ is a multiple of $ 2^{2007}$.
22 replies
cyshine
Nov 2, 2007
Ilikeminecraft
Apr 26, 2025
Quadratic residues in a given interval
G H J
Source: Brazilian Math Olympiad, Problem 2
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
cyshine
236 posts
#1 • 2 Y
Y by Davi-8191, Adventure10
Find the number of integers $ c$ such that $ -2007 \leq c \leq 2007$ and there exists an integer $ x$ such that $ x^2 + c$ is a multiple of $ 2^{2007}$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
TTsphn
1313 posts
#2 • 2 Y
Y by Adventure10, Mango247
Consider the quadric :
$ x^2\equiv c (\mod 2^k)$ where $ c \equiv 1 (\mod 2)$
If $ k\geq 3$ then the equation has solution if and only if :
$ c\equiv 1 (\mod 8)$
You can prove by induction.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
hjbrasch
428 posts
#3 • 2 Y
Y by Adventure10, Mango247
Clearly, $ c=0$ fulfills the property, so let $ c$ non-zero from now on. Write a candidate as $ c=2^{n}m$ with $ 0\leq n$ and an odd $ m\in\mathbb{Z}$. From $ |c|\leq 2007$ we get $ n\leq 10$ and from $ x^2\equiv-c\bmod{2^{2007}}$ we get $ n$ even, i.e. $ c=2^{2t}m$ with $ 0\leq t\leq 5$ and $ |m|\leq\frac{2007}{2^{2t}}$. Therefore, we have $ y^2=-m\bmod{2^{2007-2t}}$ with $ y=\frac{x}{2^t}$ odd.

In general, we observe $ (1+2x)^2=1+4x(x+1)\equiv 1\bmod{8}$ and for $ k\geq 3$ we have ${ ((\mathbb{Z}/2^k\mathbb{Z}})^*)^2\simeq ((\mathbb{Z}/2\mathbb{Z})\times (\mathbb{Z}/2^{k-2}\mathbb{Z}))^2\simeq \mathbb{Z}/2^{k-3}\mathbb{Z}$, i.e. $ y^2\equiv -m\bmod{2^{2007-2t}}\Longleftrightarrow m\equiv -1\bmod{8}$ and the solution set is

$ \{-1+8r|-250\leq r\leq 251\}\cup\\
\{-4+32r|-62\leq r\leq 62\}\cup\\
\{-16+128r|-15\leq r\leq 15\}\cup\\
\{-64+512r|-3\leq r\leq 4\}\cup\\
\{0,-256,-256+2048,-1024\}$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Brazilian Guy
2 posts
#4 • 2 Y
Y by Adventure10, Mango247
Counting all the solutions, we discover that there are $ 669$ solutions (if I'm not wrong). This number is exactely $ 2007/3$. Is there a simple way to discover that the answer is $ 2007/3$? Well, if we consider $ n=2007$ and we make $ n\longrightarrow \infty$, I think the number of solutions tend to $ \frac{1}{8}\cdot 2\cdot n(1+\frac{1}{4}+\frac{1}{16}+\frac{1}{64}+\cdots )=\frac{n}{3}$. Is this correct?
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
cyshine
236 posts
#5 • 1 Y
Y by Adventure10
If I'm not mistaken, the answer is $ 670$. But you're right about it being roughly $ n/3$.

I'm curious about the general case, i.e., what are the $ p$-th power residues$ {}\bmod p^m$? That is, what are the numbers $ 0\leq c < p^m$ such that the congruence $ x^p \equiv c \pmod{p^m}$ has solution?

I know how to solve it for $ p = 3$. I didn't think about the other cases, though.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
littletush
761 posts
#6 • 2 Y
Y by Adventure10, Mango247
the general result:
$x^2$ can be congruent to any number congurent to $1$ modulo $8$.
it's not difficult to prove,by induction on $k$,where the modulo is $2^k$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
AwesomeYRY
579 posts
#7 • 4 Y
Y by Mango247, Mango247, Mango247, endless_abyss
Lemma: Mod $2^n$, an odd number is a quadratic residue if and only if it is $\equiv 1 \pmod{8}$,
Proof: Firstly, this is necessary because $(2k+1)^2 = 4k(k+1)+1 \equiv 1 \pmod{8}$.

This is sufficient as well, we will show that there are at least $2^{n-3}$ distinct odd quadratic residues. Consider odds $x,y < 2^{n-2}$. I claim that $x^2\equiv y^2 \pmod{2^{n}} \Longrightarrow x\equiv y \pmod{2^n}$.

Consider two cases:

Case 1, $v_2(x-y)=1$,
\[v_2(x^2-y^2) = v_2(x-y)+v_2(x+y) < 1 + (n-1) = n, \text{ a fail }\]Case 2, $v_2(x+y)=1$, then we have $v_2(x-y)\geq n-1$, and $y-x < 2^{n-2} \Longrightarrow y\equiv x \pmod{2^n}$.

Since there are $2^{n-3}$ odds less than $2^{n-2}$, we are done $\square$.

We now answer extract.

Case 1: For odd c, we choose one of the 502 values
\[-2007,-1999,\ldots 1993, 2001\]
Case 2: For $2\mid x \Longrightarrow 4\mid x$, we scale down the range to [-501,501]. We then choose one of the 125 from
\[-495, -487, \ldots 489, 497\]
Case 3: For $4\mid x \Longrightarrow 16\mid x$, we scale down the c-range to [-125,125] and choose of the 31 values.
\[-119,-111,\ldots 113,121\]
Case 4: For $8\mid x \Longrightarrow 64\mid x$, we scale down the c-range to [-31,31]. From here we can choose any of 8 choices
\[-31, -23,-15,-7,1,9,17,25\]Next scale down brings us to [-7,7], from here we can choose four values, -7, 0,1,4.

Thus, in total we have 502+125+31+8+4=670 values of $c$ that work.
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
#8
Y by
The key claim is the following characterization of quadratic residues modulo $2^n$:

Claim: For $n \geq 3$, if $\nu_2(a)\leq n-3$, $a$ is a nonzero quadratic residue modulo $2^n$ if and only if $\tfrac{a}{\nu_2(a)} \equiv 1 \pmod{8}$ and $\nu_2(a)$ is even.
Proof: I will first prove that if $a$ is odd, then $a$ is a quadratic residue modulo $2^n$ if and only if $a \equiv 1 \pmod{8}$. Note that if $a$ is a quadratic residue modulo $2^n$ for $n\geq 3$, it must be a quadratic residue modulo $8$ as well, so any odd quadratic residues mod $2^n$ must be 1 mod $8$. Thus, we only have to prove that every $a \equiv 1 \pmod{8}$ works. This is by induction on $n$, with the base case of $n=3$ being obvious.
I will prove that if $a$ is an odd quadratic residue $\pmod{2^n}$, then both $a$ and $a+2^n$ are quadratic residues $\pmod{2^{n+1}}$. Pick $x$ such that $x^2 \equiv a \pmod{2^n}$. Then mod $2^n$, we have $(2^{n-1}+x)^2 \equiv a \pmod{2^n}$, but $(2^{n-1}+x)^2 \not \equiv x^2 \pmod{2^{n+1}}$. Thus one of $x^2,(2^{n-1}+x)^2$ is $a$ mod $2^{n+1}$, and the other is $a+2^n$.
Now suppose $2^{k}b$ is a quadratic residue mod $2^n$. Clearly $k$ is even, so pick $y$ such that $(2^{k/2}y)^2 \equiv b \pmod{2^n}$, where $b$ is odd (and therefore $y$ is odd). Then $y^2 \equiv b \pmod{2^{n-k}}$. We have that $b$ is odd and $k \leq n-3$, $n-k \geq 3$, hence by the above result we require $b\equiv 1 \pmod{8}$. $\blacksquare$

It remains to perform the answer extraction, which we will do by considering $\nu_2(a)$. Letting $f(n)$ denote the number of integers in $[-n,n]$ which are $1 \pmod{8}$, we can find that the answer is $f(2007)+f(501)+f(125)+f(31)+f(7)+f(2)+1$, where the $+1$ at the end corresponds to $0$ working. It is easy to compute this quantity as $670$. $\blacksquare$
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
#9 • 1 Y
Y by Funcshun840
The key claim is the following:

Claim. All $a \equiv 1 \pmod 8$ are the only odd quadratic residues mod $2^n$ for any $n \geq 3$.

Proof. Obviously the condition is restrictive. To show that they all work, it suffices to show that there are $2^{n-3}$ quadratic residues mod $2^n$. But observe that the order of $5$ mod $2^n$ is $2^{n-2}$ by a simple LTE computation. Hence, all powers of this quasi-generator $5^{2a}$ for $0 \leq a < 2^{n-3}$ are distinct quadratic residues, which suffices. $\blacksquare$

Now for obvious reasons, $n$ is a quadratic residue if and only if $n = 2^k \cdot n'$ for $n' \equiv 1 \pmod 8$ and $k$ even. A computation yields the number of such numbers as $670$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
pi271828
3371 posts
#10
Y by
The problem is simply finding all QR's in between $-2007$ and $2007$. It suffices to find only the odds, because then we can just add an even power of $2$. We will prove that a odd number is a QR iff it is 1 $\pmod 8$ using induction. Notice that an odd QR must be $1 \pmod 8$. Assume that this is true for $2^n$. If $a$ is a QR $\pmod{2^n}$, let $x^2 \equiv a \pmod{2^n}$. This implies that $x^2 = a, a+2^n \pmod{2^{n+1}}$. Notice we only have to worry about the latter case. Assume that $x^2 = a+2^n$. Notice that now $(2^{n-1} - x)^2 = x^2 \pmod{2^n}$. If $(2^{n-1}-x)^2 = a \pmod{2^{n+1}}$, we are done with the induction. If $(2^{n-1}-x)^2 = a+2^n \pmod{2^{n+1}}$ which implies that $x$ is even, which is a contradiction. Now we know the answer is all numbers where the odd part is $1 \pmod 8$. The answer readily follows.
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
#11
Y by
Used 30% hint

It suffices to find the # of QR from -2007 to 2007 mod 2^2007. The key is to see that alll $a \equiv 1 \pmod 8$ are the only odd QR mod 2^n; this follows from knowing 1 mod 8 being the upper bound, and to show there are 2^{n-3} of these such QR, from computing using LTE, ord_{2^n}5=2^{n-2} this implies 5^{2k} has distinct QRs for $k\in[0,2^{n-3})\in\mathbb{Z}$, since if there were two equal values the sequence would be periodic, but any periodic sequence must go over 1, and yet 1 hasn't occurred yet, meaning they're distinct QRs.
It follows that n is a QR iff $n=2^{2i}j$ for $j\equiv1\pmod8$ as the general answer; in particular, computation gives the answer of 670.

Remark. This is indeed generalizable by the technique we used.
This post has been edited 2 times. Last edited by huashiliao2020, Sep 2, 2023, 5:31 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
john0512
4190 posts
#12
Y by
Claim: For $n\geq 3$, an odd positive integer $0\leq r\leq 2^n-1$ is a quadratic residue if and only if $r$ is 1 mod 8. The only if direction is trivial since the only odd quadratic residue mod 8 is 1.

For the other direction, use induction. This is clearly true for $n$ up to 4. Then, suppose that $$8a+1\equiv k^2\pmod{2^n}$$We claim that we either have $$8a+1\equiv k^2\pmod{2^{n+1}}$$or $$8a+1\equiv (2^{n-1}-k)^2\pmod{2^{n+1}}.$$Suppose that the first condition is NOT true. Then, we must have $$k^2\equiv 2^{n}+8a+1\pmod{2^{n+1}}.$$Thus, $$(2^{n-1}-k)^2\equiv 2^{2n-2}-k2^n+k^2$$$$\equiv 8a+1+2^n(1-k).$$Since $k$ is odd, this is just $8a+1$ mod $2^{n+1}$, hence proven.

Claim 2: Suppose that $1\leq r\leq 2^n-1$ is an even residue mod $n$. Then, $r$ is a quadratic residue if and only if the $v_2$ of $r$ is odd and the largest odd divisor of $r$ is a quadratic residue. Clearly, the $v_2$ being odd is necessary.

Let $r=2^{2k}q$, so $q$ is the odd part. Since $r$ and $q$ differ by a square factor, one is a quadratic residue if and only if the other is, hence shown.

Thus, the answer is simply 0 in addition to any residues whose $v_2$ is even and odd part is 1 mod 8. The answer is then $670.$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
dolphinday
1327 posts
#13
Y by
This question is basically asking for the number of quadratic residues $2^{2007}$ that are between $-2007$ and $2007$.

Claim: A number is an odd QR of $2^n$ if and only if it is $\equiv 1\pmod{8}$.

Taking the square of $(2k + 1)$ we get $(4k(k + 1)) + 1$ which is obviously always $1\pmod{8}$.

Now to prove that all numbers $1\pmod{8}$ work, we can prove that there at least $2^{n-3}$ QRs $\pmod{2^n}$.

Since the order of $5\pmod{2^n}$ is $2^{n-2}$ by LTE, there are $2^{n-3}$ odd QRs that take the form $5^{2a}\pmod{2^{n}}$.

It is clear from here that all quadratic residues take the form $2^k$ multiplied by some number $1\pmod{8}$, or is equal to $0$.

Doing casework on $k$, there are $502 + 125 + 31 + 8 + 3 + 1 = 670$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
OronSH
1745 posts
#14
Y by
First, if $c$ is odd then we will show that everything that works is $c \equiv -1 \pmod 8.$ Suppose $a^2 \equiv b^2 \pmod{2^{2007}}$ with $a,b$ odd. Then $(a+b)(a-b) \equiv 0 \pmod{2^{2007}},$ and since one of $a+b,a-b$ is $2 \pmod{4}$ we have either $a \equiv \pm b \pmod{2^{2006}}.$ Thus, all odds from $1$ to $2^{2005}-1$ have distinct residues, so there are at least $2^{2004}.$ However, notice that $a^2 \equiv 1 \pmod{8},$ so these $2^{2004}$ residues must precisely be the ones that are $1 \pmod{8}.$ Thus, we get that if $c$ is odd we have $x^2 \equiv -c \pmod{2^{2007}},$ so $c \equiv -1 \pmod 8$ and clearly these must all work.

Next if $c$ is even then we have $4 \mid c$ since we must have $4 \mid x^2.$ Then, letting $c_1=\frac c4$ and $x_1=\frac x2$ we get $2^{2005} \mid x_1^2+c_1.$ If $c_1$ is odd, then our argument from above still works since $2^{2005}$ is large enough, and if not, we just repeat this part.

Now for the answer extraction, we count the number of $c \equiv -1 \pmod 8$ from $-2007$ to $2007,$ then from $-501$ to $501,$ then from $-125$ to $125,$ then from $-31$ to $31,$ then from $-7$ to $7,$ then from $-1$ to $1,$ and finally add $1$ for $0.$ We get $502+125+31+8+2+1+1=670$ is the answer.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Shreyasharma
682 posts
#15
Y by
Hard.

The question is asking for how QR behave modulo $2^n$. The key idea is to notice that even and odd $x$ behave differently, and hence it makes sense to split into cases.

Claim: For odd $x$, if $x^2 \equiv c \pmod{2^n}$, then we have $c \equiv 1 \pmod{8}$.

Proof. Proceed with induction. The base cases of $k = \{1, 2, 3, 4\}$ are easily managed. Then assume the induction holds till some $n = k -1$. Then take some odd $x$. We are given that $x^2$ modulo $2^{k-1}$, is congruent to $1$ modulo $8$. Clearly then modulo $2^k$ we have $x^2$ leaves a residue of the form $(x^2 \text{ modulo } 2^{k-1}) + m2^{k-1}$ for some $m$. Now taking modulo $8$ we reach the claimed conclusion. $\blacksquare$

Thus we must necessarily have all QRs congruent to $1$ modulo $8$.

Claim: All $c$ congruent to $1$ modulo $8$ are QRs modulo $2^n$.

Proof. There are $2^{n-3}$ such $c$. It suffices to show that there are at least $2^{n-3}$ QRs generated by odd $x$, implying the claim. To see that this must hold note that we can take $5$ as a quasi generator, with order $2^{n-2}$. Then each $5^{2m}$ generates a distinct residue, produced by some odd $x = 5^m$. $\blacksquare$

Now for even $c$, note that as $4 \mid x^2$ we must have $4 \mid c$. Now do casework on $\frac{c}{4}$. If we have $\frac{c}{4}$ is even then we reduce it by a factor of $4$ once more, else we can compute the number of odd residues modulo $2^{n-2}$. In this way we can recurse to find, the number of odd QR's modulo $2^{n}$ is given by the sum of odd QRs congruent to $1$ modulo $8$ for $2^{n-2}$, $2^{n-4}$ and so on.

Now to answer extract there are exactly $502 + 125 + 31 + 8 + 3 + 1 = \boxed{670}$ QRs in the given range.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
peppapig_
280 posts
#16 • 1 Y
Y by dolphinday
I claim that there are $670$ possible values of $c$. Note that the problem is simply asking for all values $c$ such that $-c$ is a possible quadratic residue mod $2^{2007}$. Using this, we will solve the problem as follows.

1. For every quadratic residue $p\equiv x^2 \mod 2^{2007}$ such that $p<2^{2007}$, $\nu_2(p)$ is even.
In order to prove this, suppose that $\nu_2(x)=k$ and let $x=(2^k)q$, where $q$ is odd. If we square $x$, we get $(2^{2k})q^2$. We now have a few cases.

If $2k<2007$, then in order to get the quadratic residue value $p$, we would have to subtract some nonnegative number of $2^{2007}$'s. If $x^2$ is already less than $2^{2007}$, then $\nu_2(p)=2k$, proving our claim. If $x^2$ is greater than $2^{2007}$, note that then $x^2-2^{2007}n$ for any positive integer $n$ would be $(2^{2k})(q^2-2^{2007-2k}n)$, and since $2k<2007$, this implies that $q^2-2^{2007-2k}n$ is odd. This gives that $\nu_2(p)=2k$, proving our claim.

Finally, if $2k>2007$, $p$ is simply $0$, which is even. Therefore, if $p<2^{2007}$ is a quadratic residue of $2^{2007}$, then $\nu_2(p)$ must be even.

2. Every odd quadratic residue $p<2^{2007}$ is $1$ mod $8$.
Note that all squares are $1$ mod $8$ and $2^{2007}$ is a multiple of $8$, proving our claim.

3. Every odd $p<2^{2007}$ such that $p\equiv 1 \mod 8$ is a quadratic residue mod $2^{2007}$.
We can prove this by proving that by squaring the odd numbers from $1$ to $2^{2005}-1$, inclusive, we get $2^{2004}$ different modulos mod $2^{2007}$. We can prove this through contradiction.

Assume for the sake of contradiction, for distinct odd integers $x\neq y$ and $x,y<2^{2005}$, $x^2\equiv y^2$ mod $2^{2007}$. This would mean that
\[x^2-y^2=(x-y)(x+y)\equiv 0 \mod 2^{2007}.\]Since $x$ and $y$ are both odd, one of $(x+y)$ and $(x-y)$ must be $2$ mod $4$ while the other is $0$ mod $4$ (this can be proved by taking cases mod $4$). However, note that since $x,y<2^{2005}$, we have that $\max(\nu_2(x+y))+1=2006$ and $\max(\nu_2(x-y))+1=2005$, meaning that $\max(\nu_2((x+y)(x-y)))=2006$, which is less than $2007$, a contradiction. Therefore every odd $p<2^{2007}$ such that $p\equiv 1 \mod 8$ is a quadratic residue mod $2^{2007}$.

4. For some integer $p<2^{2007}$ such that $\nu_2(p)=2k$ and $p=2^{2k}q$, $p$ is a quadratic residue mod $2^{2007}$ if and only if $q$ is $1$ mod $8$.
Note that since $p<2^{2007}$, we have that $2^{2k}<2^{2007}$ and therefore $2^{2k}\mid2^{2007}$. Using this, we realize that if $x^2\equiv p \mod 2^{2007}$, then we must have that $\nu_2(x)=k$. Letting $x=2^ky$ for some odd integer $y$, we get that
\[2^{2k}q=p\equiv x^2\equiv2^{2k}y^2\mod2^{2007}\iff q\equiv y^2\mod2^{2007-2k}.\]We now take this in cases. Clearly, if $2k\leq 2004$, the equation is equivalent to $q$ being equivalent to $y^2$ mod some multiple of $8$. Since $y^2$ is odd, it must be $1$ mod $8$, implying that $q$ is $1$ mod $8$, proving our claim. Otherwise, if $2k=2006$, we have that since $p<2^{2007}$, $q$ must be $1$ mod $8$, proving our claim. Therefore, for some integer $p<2^{2007}$ such that $\nu_2(p)=2k$ and $p=2^{2k}q$, if $p$ is a quadratic residue mod $2^{2007}$, then $q$ is $1$ mod $8$.

Now for the other direction, note that since $q$ is $1$ mod $8$, there exists an integer $y$ such that $y^2\equiv q\mod 2^{2007}$ by (3). Using this, note that
\[(2^ky)^2\equiv (2^{2k})y^2\equiv 2^{2k}q \equiv p \mod 2^{2007},\]meaning that $p$ is a quadratic residue mod $2^{2007}$, finishing our claim.

5. Finishing.
Combining the last four claims, we see that the only $c$ satisfies the problem conditions if and only if the power of $2$ factor of $-c$ mod $2^{2007}$ has an even exponent and the odd factor is $1$ mod $8$. Using this and taking cases by $\nu_2(-c)$, we get a total of $503+125+31+8+2+1$, or $670$ possible values for $c$, finishing the problem.
This post has been edited 2 times. Last edited by peppapig_, Mar 13, 2024, 3:40 PM
Reason: Purple C:
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
AlanLG
241 posts
#17
Y by
:coolspeak: Claim. the odd quadractic residues$\pmod {2^k}$ are the $1\pmod 8$

Every odd square $\pmod {2^k}$ is $1\pmod 8$
This clearly true; note that there are $2^{k-3}$ numbers that are $1\pmod 8$, so there are at most $2^{k-3}$ quadratic residues

Every $1\pmod 8$ is a odd square
We first gonna prove that $\operatorname{ord}_{2^k}(5)=2^{k-2}$, this follows by LTE as
$$k=\nu_2(5^{\operatorname{ord}{2^k}(5)}-1)=\nu_2(5-1)+\nu_2(5+1)+\nu_2(\operatorname{ord}{2^k}(5))-1$$The even power of $5$ covers all the numbers $1\pmod 8$, then there are at least $\frac{\operatorname{ord}_{2^k}(5)}{2}=2^{k-3}$ $\text{distinct}$ quadratic residues.
So this two sets are the same, as desired.

Now, we want to count all quadratic residues, which are equivalent to all $x$ with $\nu_2(x)$ even and with odd part being $1\pmod 8$ some computation gives the answer is $670$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
joshualiu315
2534 posts
#18
Y by
Rephrase the problem as follows. Find the quadratic residues of $2^{2007}$.

We will find a general form for $2^n$: realize that we only need to compute odd quadratic residues, as we can tack on $2^{2k}$ onto any given odd quadratic residue to create an even one.


Claim 1: All odd quadratic residues $c$ must satsify $c \equiv 1 \pmod{8}$.

Proof: Let $x=2k+1$. We have

\[x^2 = (2k+1)^2 = 4k(k+1)+1 \equiv c \equiv 1 \pmod{8},\]
as desired. $\square$


Claim 2: All numbers $c \equiv 1 \pmod{8}$ are odd quadratic residues.

Proof: We will use $5$ as a generator. Let $o$ be the order of $5$ modulo $2^n$. Then,

\[5^o - 1 \equiv 0 \pmod{2^n} \iff \nu_2(5^o-1) \ge n.\]
Lifting the Exponent gives

\[\nu_2(5^o-1) = \nu_2(5-1) + \nu_2(o) \ge n \implies o = 2^{n-2}.\]
This means that every $5^{2a}$ generates a unique quadratic residue, and there are at least $2^{n-3}$ of them. $\square$

Remark: LTE applies here for $p=2$ since the condition $4 \mid x-y$ is satisfied.


At this point, casework on the number of appended powers of $2$ yields $\boxed{670}$ as our answer.
This post has been edited 1 time. Last edited by joshualiu315, Feb 12, 2024, 8:14 PM
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
#19
Y by
We first note that an odd integer is a quadratic residue modulo $2^n$ (where $n \ge 3$) iff it is $1 \pmod 8$. This follows by induction - if there exists a value of $x=k$ with $x^2 \equiv m \pmod{2^n}$, we use $x=k+2^n$ and $x=k+2^{n-1}$ to generate the residues $m$ and $m+2^n$. Also notice that a residue modulo $2^{n+1}$ must be a residue modulo $2^n$, so we cannot gain new residues.

Now we investigate the case when $c$ is even. If $v_2(c)$ is odd, then $v_2(x^2+c)$ is bounded as we won't have $v_2(x^2) = v_2(c)$. Otherwise, we let $x=2^{v_2(c)/2} \cdot y$ to get
\[2^{2007} \mid x^2+c = 2^{v_2(c)}(y^2 + o),\]
where $o$ now must be odd, so $o \equiv 7 \pmod 8$. In conclusion, $c$ must be of the form $(8i+7) \cdot 2^{2j}$ or 0, giving us $\boxed{670}$ possibilities. $\blacksquare$
This post has been edited 1 time. Last edited by shendrew7, Mar 1, 2024, 4:20 AM
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
#20 • 1 Y
Y by MS_asdfgzxcvb
Solved a while ago but forgot to post

Claim: For any positive integer $n\ge 3$, a positive integer $r<2^n$ is a quadratic residue $\pmod{2^n}$, iff $r\equiv 1\pmod 8$.
Proof: Clearly if $r\not\equiv 1\pmod 8$, then any positive integer $r\pmod{2^n}$ is not $1\pmod 8$ and thus cant be perfect square. So $r\equiv 1\pmod 8$.

Now we show that there are exactly $2^{n-3}$ odd quadratic residues $\pmod{2^n}$. Clearly there must be at most $\frac{2^n }{8} = 2^{n-3}$ of them.

Suppose odd $1\le a,b< 2^{n-2}$ satisfy $a^2 \equiv b^2 \pmod{2^n}$, and $a\ne b$.

Then we have \[n\le \nu_2(a^2 - b^2) = \nu_2(a-b) + \nu_2(a+b)\]Now, $a-b$ and $a+b$ have a difference of $2b$, so exactly one of them is not a multiple of $4$. Thus either $2^{n-1}\mid a-b$ or $2^{n-1}\mid a+b$, both of which are absurd.

There are exactly $2^{n-3}$ odd numbers between $1$ and $2^{n-2}$, so we have exactly $2^{n-3}$ odd QRs $\pmod{2^n}$. This proves that everything $1\pmod 8$ is a QR $\pmod{2^n}$. $\square$

Thus, if $m = 2^k \cdot t$, where $t$ is odd, then $m$ is a QR iff $k$ is even and $t\equiv 1\pmod 8$.


Now we answer extract, where $n=2007$. The problem condition is equivalent to $x=-c$ being a QR $\pmod{2^{2007}}$, where $-2007\le x\le 2007$.

Let $f(x) = \frac{x}{\nu_2(x)}$.

If $\nu_2(x) = 0$, then we have $f(x)\in \{-2007, -1999, \ldots, 2001\}$, which is in total $502$ numbers.

If $\nu_2(x) = 2$, then we have $f(x)\in \{-495, -487, \ldots, 497\}$, which is in total $125$ numbers.

If $\nu_2(x) = 4$, then we have $f(x)\in \{-119, -111, \ldots, 121\}$, which is in total $31$ numbers.

If $\nu_2(x) = 6$, then we have $f(x)\in \{-31, -23, \ldots, 25\}$, which is in total $8$ numbers.

If $\nu_2(x) = 8$, then we have $f(x)\in \{-7,1\}$, which is in total $2$ numbers.

If $\nu_2(x) = 10$, then we have $f(x) = 1$.

Clearly if $x\ne 0$, $\nu_2(x) > 10 $ is not possible.

If $x=0$, then we have $1$ value of $x$.

Counting up, the answer is \[502 + 125 + 31 + 8 + 2 + 1 + 1 = \boxed{670}\]
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
ihategeo_1969
236 posts
#21
Y by
Main Claim: For $n \ge 3$, we have $a$ is an odd QR $\bmod$ ${2^n}$ iff $a \equiv 1 \pmod 8$.
Proof: One direction is obvious as $1$ i only odd QR $\bmod 8$. For the other direction see that if $x$, $y$ odd then \[x^2 \equiv y^2 \pmod {2^n} \iff x \equiv \pm y \pmod {2^{n-1}}\]See that this gives us that there exactly $2^{n-3}$ odd QRs, which means all $1 \pmod 8$ numbers are QRs. $\square$

Let $2^rb$ is a QR where $b$ is odd, then it is equivalent that $b \equiv 1 \pmod 8$ and $r$ is even.

Now do a little computation and see that answer is $\boxed{670}$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
cursed_tangent1434
635 posts
#22
Y by
We claim that the answer is $\boxed{670}$ which is the number of integers of the form $2^{2r}\cdot a$ for some non-negative integer $r$ and $a \equiv 7 \pmod{8}$ (or $a=0$). We shall first show that all $c$ for which such an integer $x$ exists must be of the prescribed form.

If $c=0$ it is clear that $x=2^{1004}$ satisfies the desired constraints so in what follows we consider $c \ne 0$. Further, if $\nu_2(c)$ is odd it is clear that $\nu_2(x^2) \ne \nu_2(c)$ so
\[\nu_2(x^2+c) = \min(2\nu_2(x),\nu_2(c)) \le \nu_2(c) < 2007\]since $|c| \le 2007 < 2^{2007}$. This is a clear contradiction which implies that $\nu_2(c)$ is even. Thus, $c$ must be of the form $2^{2r}a$ for some odd integer $a$.

Now, as noted before if $\nu_2(x^2) \ne \nu_2(c)$ we have a contradiction so this implies that $\nu_2(x)=r$. So we can write $x^2=2^{2r}y^2$ for some odd integer $y$. Plugging this expressions into the desired divisibility we have,
\[2^{2007} \mid x^2+c=2^{2r}(y^2+a)\]so we have that $2^{1997}\mid2^{2007-2r} \mid y^2+a$ as $r \le 10$ since $|c| \le 2007$.

Now, note that $a \not \equiv 1 \pmod{4}$ since then $y^2+t \in \{2,3\} \pmod{4}$ which implies that the right-hand side is not even divisible by 4. Thus, we must have $a \equiv 3 \pmod{4}$ and we can write $a=4k+s$ for some integer $k$. Further, we can write $y=2z+1$ for some integer $z$. Plugging this relations into the given divisibility we have,
\[2^{1997} \mid y^2+a=(2z+1)^2+(4k+3) = 4(z(z+1)+k+1) \]which implies that $k$ must be odd. Thus, $a=4k+3=4(2l+1)+3=8l+7$ which implies that $a \equiv 7 \pmod{8}$ as desired.

We now show that all integers $c$ of the aforementioned forms indeed do satisfy the given condition. We do this via induction, showing that there exists a positive integer $x_i$ such that $2^{i+2}\mid x_i^2 + c$ for each odd $c \equiv 7 \pmod{8}$ for all $i\ge 1$ which solves the problem.

The base case is immediate since $x_1=1$ makes $x_1^2+c = c+1 \equiv 0 \pmod{8}$. Now, say there exists some positive integer $x_i$ such that $2^{i+2}\mid x_i^2 + c$ for some $i \ge 1$. Now, if $2^{i+3}\mid x_i^2 + c$ we let $x_{i+1}=x_i$. Else, let $x_{i+1}=x_i+2^{i}$. Note,
\[x_{i+1}^2 +c = (x_i+2^{i+1})^2 +c = (x_i^2+c) + 2^{i+2}+2^{2i+2} \equiv (x_i^2+c) + 2^{i+2} \pmod{2^{i+3}}\]since $2i+2 \ge i+3$ for all $i \ge 1$. Now, since $2^{i+2}\mid x_i^2 + c$ but $2^{i+3}\nmid x_i^2 + c$ we have that $x_i^2 + c \equiv 2^{i+2} \pmod{2^{i+3}}$ which implies that $2^{i+3}\mid x_{i+1}^2 + c$ as desired. This completes the induction, and 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.
Ilikeminecraft
656 posts
#23
Y by
We are computing when $-c$ is a quadratic residue modulo $2^{2007}.$ We will look at modulo $2^n.$ I claim that the odd quadratic residues modulo are values $k\equiv1\pmod8.$

We prove this with induction. For the first 3 powers, this is trivially true. Assume that if $n\leq k,$ these are the only odd quadratic residues. Assume $k\geq2$

For $n = k + 1,$ we have that any value that is $3, 5, 7\pmod8$ aren't a perfect square. Let $a \equiv 1\pmod 8.$ Let $a\equiv l^2\pmod{2^k}.$ We have that:
\begin{itemize}
\item $(l + 2^{k})^2 \equiv l^2 + l2^{k + 1} + 2^{2k}\equiv l^2\pmod{2^{k + 1}}$
\item $(l + 2^{k - 1})^2 \equiv l^2 + 2^kl + 2^{2k - 2}.$ However, since $2k - 2 \geq k + 1,$ $(l + 2^{k - 1})^2 \equiv l^2 + 2^k \equiv a\pmod{2^{k + 1}}$
\end{itemize}
Thus, $2^{2k}q$ are all quadratic residues, where $k\in\mathbb N, q\equiv1\pmod8.$ If $k = 0,$ the solves are $\{-2007, \ldots, 2001\},$ with $502$ solutions. If $k = 1,$ the solves are $125.$ By continuing, the answer is $502 + 125 + 31 + 8 + 2 + 1 + 1 = \boxed{670}$
Z K Y
N Quick Reply
G
H
=
a