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 Suggestion Form
jwelsh   0
May 6, 2021
Hello!

Given the number of suggestions we’ve been receiving, we’re transitioning to a suggestion form. If you have a suggestion for the AoPS website, please submit the Google Form:
Suggestion Form

To keep all new suggestions together, any new suggestion threads posted will be deleted.

Please remember that if you find a bug outside of FTW! (after refreshing to make sure it’s not a glitch), make sure you’re following the How to write a bug report instructions and using the proper format to report the bug.

Please check the FTW! thread for bugs and post any new ones in the For the Win! and Other Games Support Forum.
0 replies
jwelsh
May 6, 2021
0 replies
k i Read me first / How to write a bug report
slester   3
N May 4, 2019 by LauraZed
Greetings, AoPS users!

If you're reading this post, that means you've come across some kind of bug, error, or misbehavior, which nobody likes! To help us developers solve the problem as quickly as possible, we need enough information to understand what happened. Following these guidelines will help us squash those bugs more effectively.

Before submitting a bug report, please confirm the issue exists in other browsers or other computers if you have access to them.

For a list of many common questions and issues, please see our user created FAQ, Community FAQ, or For the Win! FAQ.

What is a bug?
A bug is a misbehavior that is reproducible. If a refresh makes it go away 100% of the time, then it isn't a bug, but rather a glitch. That's when your browser has some strange file cached, or for some reason doesn't render the page like it should. Please don't report glitches, since we generally cannot fix them. A glitch that happens more than a few times, though, could be an intermittent bug.

If something is wrong in the wiki, you can change it! The AoPS Wiki is user-editable, and it may be defaced from time to time. You can revert these changes yourself, but if you notice a particular user defacing the wiki, please let an admin know.

The subject
The subject line should explain as clearly as possible what went wrong.

Bad: Forum doesn't work
Good: Switching between threads quickly shows blank page.

The report
Use this format to report bugs. Be as specific as possible. If you don't know the answer exactly, give us as much information as you know. Attaching a screenshot is helpful if you can take one.

Summary of the problem:
Page URL:
Steps to reproduce:
1.
2.
3.
...
Expected behavior:
Frequency:
Operating system(s):
Browser(s), including version:
Additional information:


If your computer or tablet is school issued, please indicate this under Additional information.

Example
Summary of the problem: When I click back and forth between two threads in the site support section, the content of the threads no longer show up. (See attached screenshot.)
Page URL: http://artofproblemsolving.com/community/c10_site_support
Steps to reproduce:
1. Go to the Site Support forum.
2. Click on any thread.
3. Click quickly on a different thread.
Expected behavior: To see the second thread.
Frequency: Every time
Operating system: Mac OS X
Browser: Chrome and Firefox
Additional information: Only happens in the Site Support forum. My tablet is school issued, but I have the problem at both school and home.

How to take a screenshot
Mac OS X: If you type ⌘+Shift+4, you'll get a "crosshairs" that lets you take a custom screenshot size. Just click and drag to select the area you want to take a picture of. If you type ⌘+Shift+4+space, you can take a screenshot of a specific window. All screenshots will show up on your desktop.

Windows: Hit the Windows logo key+PrtScn, and a screenshot of your entire screen. Alternatively, you can hit Alt+PrtScn to take a screenshot of the currently selected window. All screenshots are saved to the Pictures → Screenshots folder.

Advanced
If you're a bit more comfortable with how browsers work, you can also show us what happens in the JavaScript console.

In Chrome, type CTRL+Shift+J (Windows, Linux) or ⌘+Option+J (Mac).
In Firefox, type CTRL+Shift+K (Windows, Linux) or ⌘+Option+K (Mac).
In Internet Explorer, it's the F12 key.
In Safari, first enable the Develop menu: Preferences → Advanced, click "Show Develop menu in menu bar." Then either go to Develop → Show Error console or type Option+⌘+C.

It'll look something like this:
IMAGE
3 replies
slester
Apr 9, 2015
LauraZed
May 4, 2019
k i Community Safety
dcouchman   0
Jan 18, 2018
If you find content on the AoPS Community that makes you concerned for a user's health or safety, please alert AoPS Administrators using the report button (Z) or by emailing sheriff@aops.com . You should provide a description of the content and a link in your message. If it's an emergency, call 911 or whatever the local emergency services are in your country.

Please also use those steps to alert us if bullying behavior is being directed at you or another user. Content that is "unlawful, harmful, threatening, abusive, harassing, tortuous, defamatory, vulgar, obscene, libelous, invasive of another's privacy, hateful, or racially, ethnically or otherwise objectionable" (AoPS Terms of Service 5.d) or that otherwise bullies people is not tolerated on AoPS, and accounts that post such content may be terminated or suspended.
0 replies
dcouchman
Jan 18, 2018
0 replies
Iran geometry
Dadgarnia   23
N 13 minutes ago by Ilikeminecraft
Source: Iranian TST 2018, first exam, day1, problem 3
In triangle $ABC$ let $M$ be the midpoint of $BC$. Let $\omega$ be a circle inside of $ABC$ and is tangent to $AB,AC$ at $E,F$, respectively. The tangents from $M$ to $\omega$ meet $\omega$ at $P,Q$ such that $P$ and $B$ lie on the same side of $AM$. Let $X \equiv PM \cap BF $ and $Y \equiv QM \cap CE $. If $2PM=BC$ prove that $XY$ is tangent to $\omega$.

Proposed by Iman Maghsoudi
23 replies
Dadgarnia
Apr 7, 2018
Ilikeminecraft
13 minutes ago
Dou Fang Geometry in Taiwan TST
Li4   9
N 13 minutes ago by WLOGQED1729
Source: 2025 Taiwan TST Round 3 Mock P2
Let $\omega$ and $\Omega$ be the incircle and circumcircle of the acute triangle $ABC$, respectively. Draw a square $WXYZ$ so that all of its sides are tangent to $\omega$, and $X$, $Y$ are both on $BC$. Extend $AW$ and $AZ$, intersecting $\Omega$ at $P$ and $Q$, respectively. Prove that $PX$ and $QY$ intersects on $\Omega$.

Proposed by kyou46, Li4, Revolilol.
9 replies
Li4
Apr 26, 2025
WLOGQED1729
13 minutes ago
A4 BMO SHL 2024
mihaig   0
18 minutes ago
Source: Someone known
Let $a\ge b\ge c\ge0$ be real numbers such that $ab+bc+ca=3.$
Prove
$$3+\left(2-\sqrt 3\right)\cdot\frac{\left(b-c\right)^2}{b+\left(\sqrt 3-1\right)c}\leq a+b+c.$$Prove that if $k<\sqrt 3-1$ is a positive constant, then
$$3+\left(2-\sqrt 3\right)\cdot\frac{\left(b-c\right)^2}{b+kc}\leq a+b+c$$is not always true
0 replies
mihaig
18 minutes ago
0 replies
Nice one
imnotgoodatmathsorry   5
N an hour ago by arqady
Source: Own
With $x,y,z >0$.Prove that: $\frac{xy}{4y+4z+x} + \frac{yz}{4z+4x+y} +\frac{zx}{4x+4y+z} \le \frac{x+y+z}{9}$
5 replies
1 viewing
imnotgoodatmathsorry
May 2, 2025
arqady
an hour ago
k Multiple black things [RESOLVED]
Yiyj   8
N May 12, 2025 by Yiyj
Why is there like multiple black thingies as shown in the attachments? When I also clicked on other threads, the black thingies for all of them stayed. So weird…
8 replies
Yiyj
May 12, 2025
Yiyj
May 12, 2025
File uploads on aops
ohiorizzler1434   3
N May 12, 2025 by Craftybutterfly
What is the length of time a file uploaded to cdn.artofproblemsolving lasts before it is taken down?
3 replies
ohiorizzler1434
May 12, 2025
Craftybutterfly
May 12, 2025
k Happy mother’s day
Rice_Farmer   4
N May 12, 2025 by JohannIsBach
Happy Mother’s Day!
4 replies
Rice_Farmer
May 11, 2025
JohannIsBach
May 12, 2025
k happy mothers day!
JohannIsBach   5
N May 12, 2025 by JohannIsBach
hi! happy mothers day! hows it goin? happy mothers day!
5 replies
JohannIsBach
May 11, 2025
JohannIsBach
May 12, 2025
k (Another) Reaper bug
RedChameleon   3
N May 8, 2025 by jlacosta
Sbarrack updated the home page of reaper. Now when I want to click on current or upcoming games, when I click the buttons, they do not redirect me to the game.

I have not recorded footage because I'm lazy but I'm currently on a Chromebook and I'm using Chrome.
3 replies
RedChameleon
May 8, 2025
jlacosta
May 8, 2025
k Is it a error for reaper
tyrantfire4   5
N May 8, 2025 by k1glaucus
I was going to reap on reaper and it put me on a strange reaper page I figured out to to reap by using the url
https://artofproblemsolving.com/reaper/reaper?id=85and changing the 85 but it was so weird I kept the page
5 replies
tyrantfire4
May 8, 2025
k1glaucus
May 8, 2025
Reaper bug
ChessPanther   3
N May 8, 2025 by Craftybutterfly
In reaper game 96 it says it begins in 3 days but when you look at the upcoming games it says it starts on June 10th? I don't know which it starts on.
3 replies
ChessPanther
May 8, 2025
Craftybutterfly
May 8, 2025
k Latex problem
hakuj   2
N May 8, 2025 by k1glaucus
Why is Latex not allowed in the text?It is said that new user is not allowed to post an image.How could I post a math problem without Latex?
2 replies
hakuj
May 8, 2025
k1glaucus
May 8, 2025
k Any way to collapse these huge headers?
ComicallyUnfunny   3
N May 8, 2025 by k1glaucus
As you can see, literally 60% of screen space is consumed by headers (even with the banner announcement closed). Is there any way to actually use more screen space for the content?
3 replies
ComicallyUnfunny
May 8, 2025
k1glaucus
May 8, 2025
Python exit() module decriptions appear as "undefined"
SoaringHigh   16
N May 7, 2025 by LostInBali
Summary of the problem: When using exit() (or quit()) in the Python windows on AoPS the "Description" and "To fix" options show up as "undefined"
sample program
Page URL: N/A
Steps to reproduce:
1. Use the AoPS Python module to execute the exit() or quit() functions in a program. (try running the sample program)
Expected behavior: The "Description" and "To fix" sections give a description of SystemExit
Frequency: Always
Operating system(s): Windows 11 Home
Browser(s), including version: Microsoft Edge 130.0.2849.46
Additional information: N/A
16 replies
SoaringHigh
Oct 22, 2024
LostInBali
May 7, 2025
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
4188 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
5608 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
235 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
634 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
651 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