We have your learning goals covered with Spring and Summer courses available. Enroll today!

G
Topic
First Poster
Last Poster
k a March Highlights and 2025 AoPS Online Class Information
jlacosta   0
Mar 2, 2025
March is the month for State MATHCOUNTS competitions! Kudos to everyone who participated in their local chapter competitions and best of luck to all going to State! Join us on March 11th for a Math Jam devoted to our favorite Chapter competition problems! Are you interested in training for MATHCOUNTS? Be sure to check out our AMC 8/MATHCOUNTS Basics and Advanced courses.

Are you ready to level up with Olympiad training? Registration is open with early bird pricing available for our WOOT programs: MathWOOT (Levels 1 and 2), CodeWOOT, PhysicsWOOT, and ChemWOOT. What is WOOT? WOOT stands for Worldwide Online Olympiad Training and is a 7-month high school math Olympiad preparation and testing program that brings together many of the best students from around the world to learn Olympiad problem solving skills. Classes begin in September!

Do you have plans this summer? There are so many options to fit your schedule and goals whether attending a summer camp or taking online classes, it can be a great break from the routine of the school year. Check out our summer courses at AoPS Online, or if you want a math or language arts class that doesn’t have homework, but is an enriching summer experience, our AoPS Virtual Campus summer camps may be just the ticket! We are expanding our locations for our AoPS Academies across the country with 15 locations so far and new campuses opening in Saratoga CA, Johns Creek GA, and the Upper West Side NY. Check out this page for summer camp information.

Be sure to mark your calendars for the following events:
[list][*]March 5th (Wednesday), 4:30pm PT/7:30pm ET, HCSSiM Math Jam 2025. Amber Verser, Assistant Director of the Hampshire College Summer Studies in Mathematics, will host an information session about HCSSiM, a summer program for high school students.
[*]March 6th (Thursday), 4:00pm PT/7:00pm ET, Free Webinar on Math Competitions from elementary through high school. Join us for an enlightening session that demystifies the world of math competitions and helps you make informed decisions about your contest journey.
[*]March 11th (Tuesday), 4:30pm PT/7:30pm ET, 2025 MATHCOUNTS Chapter Discussion MATH JAM. AoPS instructors will discuss some of their favorite problems from the MATHCOUNTS Chapter Competition. All are welcome!
[*]March 13th (Thursday), 4:00pm PT/7:00pm ET, Free Webinar about Summer Camps at the Virtual Campus. Transform your summer into an unforgettable learning adventure! From elementary through high school, we offer dynamic summer camps featuring topics in mathematics, language arts, and competition preparation - all designed to fit your schedule and ignite your passion for learning.[/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, Mar 2 - Jun 22
Friday, Mar 28 - Jul 18
Sunday, Apr 13 - Aug 10
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
Tuesday, Mar 25 - Jul 8
Sunday, Apr 13 - Aug 10
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, Mar 23 - Jul 20
Monday, Apr 7 - Jul 28
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
Sunday, Mar 16 - Jun 8
Wednesday, Apr 16 - Jul 2
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
Monday, Mar 17 - Jun 9
Thursday, Apr 17 - Jul 3
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
Sunday, Mar 2 - Jun 22
Wednesday, Apr 16 - Jul 30
Tuesday, May 6 - Aug 19
Wednesday, Jun 4 - Sep 17
Sunday, Jun 22 - Oct 19
Friday, Jul 18 - Nov 14

Introduction to Geometry
Tuesday, Mar 4 - Aug 12
Sunday, Mar 23 - Sep 21
Wednesday, Apr 23 - Oct 1
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

Intermediate: Grades 8-12

Intermediate Algebra
Sunday, Mar 16 - Sep 14
Tuesday, Mar 25 - Sep 2
Monday, Apr 21 - Oct 13
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
Sunday, Mar 23 - Aug 3
Wednesday, May 21 - Sep 17
Sunday, Jun 22 - Nov 2

Intermediate Number Theory
Friday, Apr 11 - Jun 27
Sunday, Jun 1 - Aug 24
Wednesday, Jun 18 - Sep 3

Precalculus
Sunday, Mar 16 - Aug 24
Wednesday, Apr 9 - Sep 3
Friday, May 16 - Oct 24
Sunday, Jun 1 - Nov 9
Monday, Jun 30 - Dec 8

Advanced: Grades 9-12

Olympiad Geometry
Wednesday, Mar 5 - May 21
Tuesday, Jun 10 - Aug 26

Calculus
Sunday, Mar 30 - Oct 5
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
Sunday, Mar 23 - Jun 15
Wednesday, Apr 16 - Jul 2
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
Friday, Apr 11 - Jun 27
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
Tuesday, Mar 4 - May 20
Monday, Mar 31 - Jun 23
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

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
Monday, Mar 24 - Jun 16
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
Sunday, Mar 30 - Jun 22
Wednesday, May 21 - Aug 6
Sunday, Jun 15 - Sep 14
Monday, Jun 23 - Sep 15

Physics 1: Mechanics
Tuesday, Mar 25 - Sep 2
Thursday, May 22 - Oct 30
Monday, Jun 23 - Dec 15

Relativity
Sat & Sun, Apr 26 - Apr 27 (4:00 - 7:00 pm ET/1:00 - 4:00pm PT)
Mon, Tue, Wed & Thurs, Jun 23 - Jun 26 (meets every day of the week!)
0 replies
jlacosta
Mar 2, 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
Inequality => square
Rushil   12
N an hour ago by ohiorizzler1434
Source: INMO 1998 Problem 4
Suppose $ABCD$ is a cyclic quadrilateral inscribed in a circle of radius one unit. If $AB \cdot BC \cdot CD \cdot DA \geq 4$, prove that $ABCD$ is a square.
12 replies
Rushil
Oct 7, 2005
ohiorizzler1434
an hour ago
p + q + r + s = 9 and p^2 + q^2 + r^2 + s^2 = 21
who   28
N an hour ago by asdf334
Source: IMO Shortlist 2005 problem A3
Four real numbers $ p$, $ q$, $ r$, $ s$ satisfy $ p+q+r+s = 9$ and $ p^{2}+q^{2}+r^{2}+s^{2}= 21$. Prove that there exists a permutation $ \left(a,b,c,d\right)$ of $ \left(p,q,r,s\right)$ such that $ ab-cd \geq 2$.
28 replies
who
Jul 8, 2006
asdf334
an hour ago
H not needed
dchenmathcounts   44
N 2 hours ago by Ilikeminecraft
Source: USEMO 2019/1
Let $ABCD$ be a cyclic quadrilateral. A circle centered at $O$ passes through $B$ and $D$ and meets lines $BA$ and $BC$ again at points $E$ and $F$ (distinct from $A,B,C$). Let $H$ denote the orthocenter of triangle $DEF.$ Prove that if lines $AC,$ $DO,$ $EF$ are concurrent, then triangle $ABC$ and $EHF$ are similar.

Robin Son
44 replies
dchenmathcounts
May 23, 2020
Ilikeminecraft
2 hours ago
IZHO 2017 Functional equations
user01   51
N 2 hours ago by lksb
Source: IZHO 2017 Day 1 Problem 2
Find all functions $f:R \rightarrow R$ such that $$(x+y^2)f(yf(x))=xyf(y^2+f(x))$$, where $x,y \in \mathbb{R}$
51 replies
user01
Jan 14, 2017
lksb
2 hours ago
chat gpt
fuv870   2
N 2 hours ago by fuv870
The chat gpt alreadly knows how to solve the problem of IMO USAMO and AMC?
2 replies
fuv870
2 hours ago
fuv870
2 hours ago
Inequality with wx + xy + yz + zw = 1
Fermat -Euler   23
N 2 hours ago by hgomamogh
Source: IMO ShortList 1990, Problem 24 (THA 2)
Let $ w, x, y, z$ are non-negative reals such that $ wx + xy + yz + zw = 1$.
Show that $ \frac {w^3}{x + y + z} + \frac {x^3}{w + y + z} + \frac {y^3}{w + x + z} + \frac {z^3}{w + x + y}\geq \frac {1}{3}$.
23 replies
Fermat -Euler
Nov 2, 2005
hgomamogh
2 hours ago
Waiting for a dm saying me again "old geometry"
drmzjoseph   0
2 hours ago
Source: Idk easy
Given $ABCD$ a tangencial quadrilateral that is not a rhombus, let $a,b,c,d$ be lengths of tangents from $A,B,C,D$ to the incircle of the quadrilateral which center is $I$. Let $M,N$ be the midpoints of $AC,BD$ resp. Prove that
\[ \frac{MI}{IN}=\frac{a+c}{b+d} \]
0 replies
drmzjoseph
2 hours ago
0 replies
Finally hard NT on UKR MO from NT master
mshtand1   2
N 3 hours ago by IAmTheHazard
Source: Ukrainian Mathematical Olympiad 2025. Day 1, Problem 11.4
A pair of positive integer numbers \((a, b)\) is given. It turns out that for every positive integer number \(n\), for which the numbers \((n - a)(n + b)\) and \(n^2 - ab\) are positive, they have the same number of divisors. Is it necessarily true that \(a = b\)?

Proposed by Oleksii Masalitin
2 replies
mshtand1
Mar 13, 2025
IAmTheHazard
3 hours ago
IMOC 2017 G5 (<A=120 => E, F, Y,Z are concyclic, incenter related)
parmenides51   4
N 3 hours ago by ehuseyinyigit
Source: https://artofproblemsolving.com/community/c6h1740077p11309077
We have $\vartriangle ABC$ with $I$ as its incenter. Let $D$ be the intersection of $AI$ and $BC$ and define $E, F$ in a similar way. Furthermore, let $Y = CI \cap DE, Z = BI \cap DF$. Prove that if $\angle BAC = 120^o$, then $E, F, Y,Z$ are concyclic.
IMAGE
4 replies
parmenides51
Mar 20, 2020
ehuseyinyigit
3 hours ago
Bosnia and Herzegovina JBMO TST 2013 Problem 1
gobathegreat   3
N 3 hours ago by DensSv
Source: Bosnia and Herzegovina Junior Balkan Mathematical Olympiad TST 2013
It is given $n$ positive integers. Product of any one of them with sum of remaining numbers increased by $1$ is divisible with sum of all $n$ numbers. Prove that sum of squares of all $n$ numbers is divisible with sum of all $n$ numbers
3 replies
gobathegreat
Sep 16, 2018
DensSv
3 hours ago
D1015 : A strange EF for polynomials
Dattier   0
3 hours ago
Source: les dattes à Dattier
Find all $P \in \mathbb R[x,y]$ with $P \not\in \mathbb R[x] \cup \mathbb R[y]$ and $\forall g,f$ homeomorphismes of $\mathbb R$, $P(f,g)$ is an homoemorphisme too.
0 replies
Dattier
3 hours ago
0 replies
P, Q,R collinear and U, R, O, V concyclic wanted, cyclic ABCD, circumcenters
parmenides51   2
N 4 hours ago by DensSv
Source: 2012 Romania JBMO TST2 P4
The quadrilateral $ABCD$ is inscribed in a circle centered at $O$, and $\{P\} = AC \cap BD, \{Q\} = AB \cap CD$. Let $R$ be the second intersection point of the circumcircles of the triangles $ABP$ and $CDP$.
a) Prove that the points $P, Q$, and $R$ are collinear.
b) If $U$ and $V$ are the circumcenters of the triangles $ABP$, and $CDP$, respectively, prove that the points $U, R, O, V$ are concyclic.
2 replies
parmenides51
May 29, 2020
DensSv
4 hours ago
Unsolved Diophantine(I think)
Nuran2010   1
N 4 hours ago by Nuran2010
Find all solutions for the equation $2^n=p+3^p$ where $n$ is a positive integer and $p$ is a prime.(Don't get mad at me,I've used the search function and did not see a correct and complete solution anywhere.)
1 reply
Nuran2010
Mar 14, 2025
Nuran2010
4 hours ago
2^a + 3^b + 1 = 6^c
togrulhamidli2011   1
N 4 hours ago by CM1910
Find all positive integers (a, b, c) such that:

\[
2^a + 3^b + 1 = 6^c
\]
1 reply
togrulhamidli2011
Yesterday at 12:34 PM
CM1910
4 hours ago
m=4k^2-5
Zorro   33
N Dec 14, 2023 by bhan2025
Source: Poland 2005, IMO Shortlist 2004, number theory problem 4
Let $k$ be a fixed integer greater than 1, and let ${m=4k^2-5}$. Show that there exist positive integers $a$ and $b$ such that the sequence $(x_n)$ defined by \[x_0=a,\quad x_1=b,\quad x_{n+2}=x_{n+1}+x_n\quad\text{for}\quad n=0,1,2,\dots,\] has all of its terms relatively prime to $m$.

Proposed by Jaroslaw Wroblewski, Poland
33 replies
Zorro
Apr 16, 2005
bhan2025
Dec 14, 2023
m=4k^2-5
G H J
Source: Poland 2005, IMO Shortlist 2004, number theory problem 4
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Zorro
92 posts
#1 • 4 Y
Y by Com10atorics, Adventure10, Mango247, and 1 other user
Let $k$ be a fixed integer greater than 1, and let ${m=4k^2-5}$. Show that there exist positive integers $a$ and $b$ such that the sequence $(x_n)$ defined by \[x_0=a,\quad x_1=b,\quad x_{n+2}=x_{n+1}+x_n\quad\text{for}\quad n=0,1,2,\dots,\] has all of its terms relatively prime to $m$.

Proposed by Jaroslaw Wroblewski, Poland
This post has been edited 1 time. Last edited by djmathman, Aug 1, 2015, 2:54 AM
Reason: formatting
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
grobber
7849 posts
#2 • 5 Y
Y by phiReKaLk6781, numbertheorist17, Adventure10, Mango247, and 1 other user
Let $u,\bar u$ be the roots of the equation $x^2-x-1=0$ (the characteristic equation of the sequence). Since every prime divisor of $m$ has $5$ as a quadratic residue, if we fix $p$, we can regard $u,\bar u$ as residues $\pmod p$, and carry out the computations in this manner.

The general term of the sequence is $x_n=\alpha u^n+\beta \bar u^n$ (where I changed the notations a bit and took $x_0=a,x_1=b$), and we must show that we can pick $\alpha,\beta\pmod p$ s.t. $\alpha u^n+\beta \bar u^n\ne 0,\ \forall n$ in $\mathbb Z_p$. We can do this by taking $au\equiv b\pmod p$, which translates (after doing the computations) to $\beta\equiv 0\pmod p$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
zibi
94 posts
#3 • 2 Y
Y by Adventure10, Mango247
Quote:
Since every prime divisor of m has 5 as a quadratic residue, if we fix p, we can regard $u,\bar u$ as residues $\pmod p$, and carry out the computations in this manner.
I' m beginner in "mathematic english" :blush: Can you explain me what does "quadratic residue" mean ?
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Zorro
92 posts
#4 • 2 Y
Y by Adventure10, Mango247
jak sama nazwa wskazuje, jest to reszta kwadratowa
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
namanhams
46 posts
#5 • 2 Y
Y by Adventure10, Mango247
Can you give me a more clearly solution ,Grobber ?
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Pascual2005
1160 posts
#6 • 2 Y
Y by Adventure10, Mango247
Nice solution Grobber, it is also what I had!
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Leva1980
173 posts
#7 • 3 Y
Y by Adventure10, Mango247, and 1 other user
It is a very nice solution!
One can make it a little bit more elementary.
If we take $ x = 2k + 1 + m $ then $ x^{2} - 2x - 4 \equiv
(2k+1)^{2} - 2(2k+1) - 4 = 4k^{2} + 4k + 1 - 4k - 2 - 4 = 4k^{2}-5 = m \equiv 0 \ (mod \ m) $.
Therefore because of $ x $ being even we can take $ y = x/2 $ and then
$ x^{2} - 2x - 4 = 4(y^{2} - y - 1) \equiv 0 \ (mod \ m) $, and because $ m $
is odd, we get that $ y^{2} - y - 1 \equiv 0 \ (mod \ m) $. Also we have
$ gcd(y,m)= 1 $, because $ 2y \equiv 2k+1 \ (mod \ m) $, so
$ 2(2k-1)y \equiv 4k^{2} - 1 \equiv 4 \ (mod \ m) $, and $ m $ is odd.
Therefore also $ y^{n} $ is co-prime to $ m $. Now if we take
$ x_{1} = y $, $ x_{2} = y^{2} $ and define $ x_{n} $ by recursion
$ x_{n+2} = x_{n+1} + x_{n} $, then of course $ x_{n+2} \equiv x_{n+1} + x_{n} \ (mod \ m) $,
but also because of $ y $ satisfying $ y^{2} - y - 1 \equiv 0 \ (mod \ m) $, we get that
$ y^{n+2} \equiv y^{n+1} + y^{n} \ (mod \ m) $, and by induction one can show that
$ x_{n} \equiv y^{n} \ (mod \ m) $ for every $ n \geqslant 0 $. Now,
we have seen that $ y^{n} $ is co-prime to $ m $, so $ x_{n} $ is also co-prime to $ n $.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
k2c901_1
146 posts
#8 • 2 Y
Y by Adventure10, Mango247
Incidentally, this was also problem 6 of the 2nd TST of Taiwan 2005.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
beta
3001 posts
#9 • 1 Y
Y by Adventure10
Suppose $k$ is not a multiple of 5, then let prime factorization $m=p_1^{a_1}p_2^{a_2}...p_r^{a_r}$.
Define the Fibonacci sequence to be $F_0=1, F_1=1, F_n=F_{n-1}+F_{n-2}$.
By Binet's formula,
$F_n = \frac{1}{\sqrt{5}} \left ( \left (\frac{1+\sqrt{5}}{2} \right )^{n+1} - \left ( \frac{1-\sqrt{5}}{2} \right )^{n+1} \right )$

Lemma 1: $x^2 = q^2(\mod p)$ has at two solutions $x$ modulo $p^a$ if $(p, q)=1$ and $p$ is odd prime.

Proof: It factors to $(x+q)(x-q)=0(\mod p)$. then $p$ divides either $x+q$ or $x-q$ the desired lemma follows.

Hence from Lemma 1 we know $\sqrt{5} = \pm 2k (mod p_i)$ for $i=1, 2, ..., r$ since we know $p_i$ is not 2 or 5.

Lemma 2: $F_n \neq \left ( \frac{1+\sqrt{5}}{2} \right)F_{n-1} (\mod p_i)$.

Proof: Assume it's true, then we know $\sqrt{5}=\pm 2k$ and it's relatively prime to $p_i$ so WLOG we let it be $\sqrt{5}=2k$ we substitute $F_n$ and $F_{n+1}$ and simplify we have

$(1-2k)^n (4k) = 0(\mod p_i)$. but if $p_i|1-2k$ then $p_i|m+(1+2k)(1-2k)$ => $p_i | 4$=> $p_i=2$ so contradiction. If $p_i | 4k$ then $p_i |5$ also contradiction.
The desired lemma follows(you could just make a simple argument with limits, but I'm not sure how rigorous that is)

Now let
$a=2k^2-k-3$
$a = -\frac{1+2k}{2} (\mod m)$ and so $a$ is relatively prime to $m$ since
$4k^2-5 - (2k+1)(2k-1) = -4$ and $(4, 4k^2-5)=1$

$b=1$ . Now $x_n=F_{n-1}a + F_{n})b=-F_{n-1} \phi + F_n(\mod p_i)$ and it's never 0 relatively prime to all $p_i$ so relatively prime to $m$ as desired.

If $k$ is a multiple of 5 it's not big deal, as 5 is the largest power of 5 that divides m so $m=5 p_1^{a_1} p_2^{a_2}...p_r^{a_r}$ so we can just say

$a=2k^2-k-3$
$a = 2(\mod 5)$ and $a = -\frac{1+2k}{2} (\mod \frac{m}{5})$

$b=1$, and we know $x_n$ is relatively prime to all $p_i$ and is relatively prime to 5 (modulo 5 $x_n$ sequence is 2, 1, 3, 4, 2, 1, 3, 4....). So $x_n$ and $m$ are relatively prime too.

QED
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
abdurashidjon
119 posts
#10 • 1 Y
Y by Adventure10
Is Leva 1980's solution is true? I could not translate to any of $a$ or $b$.
Abdurashid
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
shfdfzhjj
347 posts
#11 • 2 Y
Y by Adventure10, Mango247
grobber wrote:
The general term of the sequence is $ x_n = \alpha u^n + \beta \bar u^n$ (where I changed the notations a bit and took $ x_0 = a,x_1 = b$), and we must show that we can pick $ \alpha,\beta\pmod p$ s.t. $ \alpha u^n + \beta \bar u^n\ne 0,\ \forall n$ in $ \mathbb Z_p$. We can do this by taking $ au\equiv b\pmod p$, which translates (after doing the computations) to $ \beta\equiv 0\pmod p$.

Can you explain in detail? :maybe:
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Mewto55555
4210 posts
#12 • 2 Y
Y by Adventure10, Mango247
Here's another solution:

Solution
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
yunxiu
571 posts
#13 • 2 Y
Y by Adventure10, Mango247
abdurashidjon wrote:
Is Leva 1980's solution is true? I could not translate to any of $a$ or $b$.
Abdurashid

$a=1$ and $b=y$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
sayantanchakraborty
505 posts
#14 • 2 Y
Y by Adventure10, Mango247
Another possible approach




Bye...

Sayantan...
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
rkm0959
1721 posts
#15 • 4 Y
Y by hakN, Resolut1on07, Adventure10, Mango247
Claim. There is a natural number $b$ such that $b^2=b+1 \pmod{m}$.
Proof of Claim. As $m$ is an odd number, it suffices to find a $b$ that $(2b-1)^2 \equiv 5 \pmod{m}$
Set $m=\prod_{i=1}^k p^{e_i}_i$. For each $p_i$, as $(2k)^2 \equiv 5 \pmod{p_i}$, we have $\left( \frac{5}{p} \right)=1$.
Now there exists an $x$ such that $x^2 \equiv 5 \pmod{p_i}$ for each $i$.
By Hensel's lemma on $f(x)=x^2-5$, we can see that there exists an $x$ that $x^2 \equiv 5 \pmod{p^{e_i}_i}$.
By CRT, we can ensure that there exists an $x$ that $x^2 \equiv 5 \pmod{m}$, and we conclude.

Now set $x_0=1$ and $x_1=b$. Then $x_n \equiv b^n \pmod{m}$, so $(x_n,m)=1$ as desired.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
pandadude
710 posts
#16 • 2 Y
Y by Adventure10, Mango247
umm... isn't this just $a=2,b=2k+1$?

Take any prime $p$ that divides $4k^2-5$
then $(2k)^2 \equiv 5 (mod p)$

using characteristic polynomials, we get $x_n \equiv 2*(\frac{1+2k}{2})^n (mod p)$

since $p$ is odd and obviously $2k$ is not $-1(modp)$ so $x_n$ coprime to $p$ so it is also coprime to $4k^2-5$ for all n.
This post has been edited 3 times. Last edited by pandadude, Aug 20, 2018, 12:01 AM
Reason: .
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
#18 • 4 Y
Y by teomihai, AlastorMoody, Adventure10, Mango247
Solution:
We can take $a=1, b=2k^2+k-2$.
Lemma: If we consider the sequence $x_1=1, x_2=s, x_n=x_{n-1}+x_{n-2}$ then all terms of $x_n$ are co-prime to $s^2-s-1$.
Proof: Any term of $x_n$ is in the form $sF_r+F_{r-1}$.
Now, note that $F_r^2(s^2-s-1)-(sF_r+F_{r-1})(sF_r-F_{r+1})=F_{r-1}F_{r+1}-F_r^2$ which is always of the form $\pm 1$ by Cassini's identity, thus any $x_n$ is coprime to $s^2-s-1$.
If we put $s=2k^2+k-2$ note that $(2k^2+k-2)(2k^2+k-3)-1=4k^4+4k^3-9k^2-5k^2+5=(4k^2-5)(k^2+k-1)$ thus for $a=1, b=2k^2+k-2$ the terms are always coprime to $4k^2-5$.
@3below(math_pi_rate): The lemma is not true for $p=3$
This post has been edited 1 time. Last edited by Mathotsav, Apr 13, 2020, 10:02 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
math_pi_rate
1218 posts
#19 • 1 Y
Y by amar_04
Nice problem! Here's a different solution (Hopefully correct!): Let $F_n$ denote the Fibonacci sequence with $F_{-1}=1$ and $F_0=0$. It's easy to see (using induction) that $$x_n=aF_{n-1}+bF_n \quad \forall n \in \mathbb{N} \cup \{0\}$$The crucial lemma is as follows:-

LEMMA For all primes $p$ such that $5$ is a quadratic residue modulo $p$, there exists some $C \in \mathbb{Z}/ p\mathbb{Z}$ such that $$F_n \not \equiv CF_{n-1} \pmod{p}$$for any $n \in \mathbb{N} \cup \{0\}$.

Proof of Claim If $p=5$, then one can easily check that $C=3$ works (since in this case, one finds that $F_n$ is periodic modulo $5$ with period $4$, which is not true). So assume $p>5$, and suppose the Lemma is not true. Then, for all $i \in \mathbb{Z}/ p\mathbb{Z}$, there is some index $n_i \geq 0$ such that $$F_{n_i} \equiv iF_{n_i-1} \pmod{p}$$For all such $i$, let $n_i$ be the smallest such index. Since $\left(\frac{5}{p} \right)=1$, so there exists some $y$ such that $y^2 \equiv 5 \pmod{p}$. Then, by Binet's Formula, \begin{align*} F_n &=\frac{1}{\sqrt{5}} \left(\left(\frac{1+\sqrt{5}}{2} \right)^n-\left(\frac{1-\sqrt{5}}{2} \right)^n \right) \\ &\equiv \frac{1}{y} \left(\left(\frac{1+y}{2} \right)^n-\left(\frac{1-y}{2} \right)^n \right) \pmod{p} \\ &\equiv \frac{1}{y} \left(\left(\frac{1+y}{2} \right)^{n+p-1}-\left(\frac{1-y}{2} \right)^{n+p-1} \right) \pmod{p} \\ &\equiv F_{n+p-1} \pmod{p} \\ \end{align*}which means that $F_n$ is periodic modulo $p$, with its period $T$ dividing $p-1$. In particular, this gives that $F_{n+T}=F_n$ for some $1 \leq T \leq p-1$. Since $n_0,n_1, \dots ,n_{p-1}$ are the smallest indices by definition, so due to periodicity after $p-1$ indices, we get $0 \leq n_i \leq p-2$. But then, by Pigeonhole Principle, two of these indices must coincide. Suppose $n_i=n_j$ with $i<j$. Then we get $$jF_{n_i-1}=jF_{n_j-1} \equiv F_{n_j} \equiv F_{n_i} \equiv iF_{n_i-1} \pmod{p} \Rightarrow (j-i)F_{n_i-1} \equiv 0 \pmod{p}$$As $0<j-i<p$, so we have $$p \mid F_{n_i-1} \Rightarrow F_{n_i} \equiv iF_{n_i-1} \equiv 0 \pmod{p} \Rightarrow p \mid \gcd(F_{n_i},F_{n_i-1})$$However, this contradicts the well known fact that $\gcd(F_r,F_{r-1})=1$ for all $r \in \mathbb{N} \cup \{0\}$. Thus, we have a contradiction, proving the Lemma. $\Box$

Return to the problem at hand. Let $p_1,p_2, \dots, p_s$ be all distinct prime divisors of $m$. Then $5 \equiv (2k)^2 \pmod{p_i}$ gives that $5$ is a quadratic residue modulo $p_i$ for all $i \in [s]$. By our Lemma, there exist constants $C_1,C_2, \dots ,C_s$ such that $$F_n \not \equiv C_iF_{n-1} \pmod{p_i} \quad \forall n \in \mathbb{N} \cup \{0\} \text{ and } i \in [s]$$Using CRT, there exists an integer $Z$ satisfying $$Z \equiv C_i \pmod{p_i} \quad \forall i \in [s]$$Choose $b=1$ and $a>0$ with $a \equiv -Z \pmod{m}$. Then, for all $i \in [s]$, we get $$x_n=aF_{n-1}+bF_n \equiv F_n-ZF_{n-1} \not \equiv 0 \pmod{p_i} \Rightarrow \gcd(x_n,m)=1 \quad \forall n \geq 0 \text{ } \blacksquare$$
This post has been edited 4 times. Last edited by math_pi_rate, Apr 12, 2020, 6:18 AM
Reason: $F_{r-1}$ instead of $F_r-1$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Al3jandro0000
804 posts
#20
Y by
@above your lemma is valid for any $p $, notice you're not using the fact $\left (\frac {5}{p}\right)=1$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
math_pi_rate
1218 posts
#21 • 1 Y
Y by amar_04
Al3jandro0000 wrote:
@above your lemma is valid for any $p $, notice you're not using the fact $\left (\frac {5}{p}\right)=1$.

I am using it in the proof of the Lemma while writing $\sqrt{5}$ as $y$. Note that if $5$ was not a quadratic residue, then I would have to work in $\mathbb{Z}[\sqrt{5}]$, and so Fermat's Little Theorem won't be applicable (Lagrange's Theorem gives a higher bound on the order, which isn't compatible with my PHP usage).

On the orther hand, there might be a possibility of the Lemma being true for all primes. I wonder if someone can prove/disprove that?
This post has been edited 2 times. Last edited by math_pi_rate, Apr 11, 2020, 9:16 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
TheThor
222 posts
#22 • 1 Y
Y by Mango247
..................
This post has been edited 2 times. Last edited by TheThor, Jul 22, 2020, 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.
math_pi_rate
1218 posts
#23 • 1 Y
Y by amar_04
Tbh I don't think the Lemma is true always (In fact, one can easily check that it fails for $p=3$). However, it can be interesting to determine for what values of $p$ it works. Here are some comments PMed to me by Superguy (I haven't read it thoroughly, but it seems ok at first glance).
Superguy in First PM wrote:
Okay so far I have approached problem a bit.
First of all I have neglected the $F_{-1}$ part which won't change much of the proof
Assume ftsoc that there doesn't exist such a $C$
By considering the group $\mathbb{Z}[\frac{1+\sqrt{5}}{2}]$ we can see that if $\left (\frac {5}{p}\right)=-1$ then $p$ is a prime in $\mathbb{Z}[\frac{1+\sqrt{5}}{2}]$
Now using some tricks u can get that $a^{(p+1)}\equiv -1 \pmod{p}$ where $a$ is golden ratio.
Using this u can easily get
$F_{n+p+1}\equiv -F_{n}\pmod{p}$
We get that period is atmost $2p+2$
So considering the sets $(F_{1},F_{2},.....F_{p+1})$ and $(F_{p+2},F_{p+3}......F_{2p+2})$ and using the minimal index notation one can see that $2\leq n_{i}\leq p+1$
This means that there should be $p$ i's given by $p$ $n_{i}$'s which implies each member of first set should give a separate $i$

For instance in case of $p=3$ clearly no such constant exists while in the case $p=17$ we clearly have a constant as $F_{9}\equiv F_{18}\equiv 0\pmod{17}$
Edit:See below for a bit more detailed explanation.
Superguy in Second PM wrote:
Hmm a bit more
So clearly there should not be any index $0<i<p+1$ such that $p|F_{i}$ otherwise we can get our constant from above argument.
Now assuming for no such index $F_{i}$ is multiple of $p$.
Hence all $(\frac{F_{i}}{F_{i-1}})$ are uniquely defined modulo $p$
Now assuming that two of them are congruent then
$\frac{F_{i}}{F_{i-1}}\equiv \frac{F_{m}}{F_{m-1}}\pmod{p}$ for some $m>i$
Now manipulating terms we get
$(\frac{1+\sqrt{5}}{1-\sqrt{5}})^{m-j}\equiv 1\pmod{p}$.
Now clearly we can show that order divides $2(p+1)$ and hence if order is less than $(p+1)$ then we can clearly get $(m,j)$ and thus our desired constant however in case order is equal to $2(p+1)$ or $(p+1)$ we can't get our desired constant.

Others can comment on this if they find something interesting :)
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Superguy
354 posts
#24
Y by
Well last part can be reduced to the fact that such a constant exists only if $F_{p+1}$ doesn't has a primitive prime divisor as $p$ which I don't think is possible to prove.
For instance after $p=3$ next such prime for which no such constant exists is $p=7$
followed by $p=23$
This post has been edited 1 time. Last edited by Superguy, Apr 13, 2020, 12:53 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
mathaddiction
308 posts
#25
Y by
Lemma. If $p$ is a prime such that $p|4k^2-5$ then we can pick $a,b$ such that for all $N\in\mathbb N$ we have $p\nmid x_n$.
Proof.
CASE I: $p=5$. It suffices to take $a=1$ and $b=3$
CASE II: $p\neq 5$
Now let $F_0=0, F_1=1$ and $F_n$ be the $n^{th}$ Fibonacci number. It is easy to show that
$$x_{n+2}=F_{n+1}a+F_nb$$CLAIM 1. $F_p\equiv 1\pmod p$
Proof.
Using the general term formular for Fibonacci sequence,
\begin{align*}
F_p&=\frac{1}{\sqrt 5}\left(\left(\frac{1+\sqrt 5}{2}\right)^p-\left(\frac{1-\sqrt{5}}{2}\right)^p\right)\\
&=\frac{2}{2^p\sqrt 5}(\sum_{i=0}^{\frac{p-1}{2}}\sqrt 5\binom{p}{2i+1}5^i)\\
&\equiv\frac{1}{2^{p-1}}5^{\frac{p-1}{2}}\\
&\equiv5^{\frac{p-1}{2}} \pmod{p}
\end{align*}The first equivalence follows from $p|\binom{p}{2i+1}$ for all $1\leq i\leq \frac{p-3}{2}$The last equvialence follow from $p\neq 2$ and Fermat little theorem. Now notice that $p|4k^2-5$, hence by Euler's criterion we have
$$5^{\frac{p-1}{2}}\equiv \left(\frac{5}{p}\right)=1\pmod p$$This proves CLAIM 1. $\blacksquare$
CLAIM 2. $F_{p-1}\equiv 0\pmod p$
Proof. The proof is similar to CLAIM 1. Again, using the general term formula for Fibonacci sequence,
\begin{align*}
F_{p-1}&=\frac{1}{\sqrt 5}\left(\left(\frac{1+\sqrt 5}{2}\right)^{p-1}-\left(\frac{1-\sqrt{5}}{2}\right)^{p-1}\right)\\
&=\frac{1}{2^{p-2}}\sum_{i=1}^{\frac{p-3}{2}}\binom{p-1}{2i+1}5^i
\end{align*}Notice that
$$\binom{p-1}{2i+1}=\frac{(p-1)!}{(2i+1)!(p-2i+1)!}\equiv \frac{(p-1)!}{(-1)^{2i+1}(p-1)!}\equiv -1\pmod p$$Hence
$$F_{p-1}\equiv -\frac{1}{2^{p-2}}\sum_{i=1}^{\frac{p-3}{2}}5^i=-\frac{5^{\frac{p-1}{2}}-1}{4\cdot 2^{p-2}}\equiv 0\pmod p$$$\blacksquare$
Now this implies that $x_{n+p-1}\equiv x_n \pmod p$ for all $n\in\mathbb N$. We now take $a=1$. It suffices to find $b$ which satisfies
$$F_{i+1}+F_ib\not\equiv 0\pmod p$$for all $0\leq i\leq p-2$. Notice that there exists at most $1$ $b$ which satisfies
$$F_{i+1}+F_ib\equiv 0\pmod p$$Since there are only $p-1$ incongruences, each of which eliminates at most $1$ chocie of $b$, together with the fact that there are $p$ residue classes modulo $p$, which gives $p$ choices for $b$, we conclude that we can always pick such $p$. This proves the lemma. $\blacksquare$
Now let $p_1,...,p_n$ be the prime factors of $m$. Then from the lemma for each $i$ we can pick $a_i$ and $b_i$ so that the sequence defined by $x_0=a_i$, $x_1=b_i$ and
$$x_{n+2}=x_{n+1}+x_n$$has all its terms relatively prime to $p_i$. Now by Chinese Remanider Theorem there exists integers $a$ and $b$ satisfying
$$a\equiv a_i\pmod{p_i}$$$$b\equiv b_i\pmod{p_i}$$Now by taking this $a$ and $b$ the proof is completed.
This post has been edited 1 time. Last edited by mathaddiction, Aug 10, 2020, 12:20 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
yayups
1614 posts
#26
Y by
By CRT, it suffices to show the problem for $p\mid 4k^2-5$ where $p$ is a prime. Note that
\[x_n = F_{n-1}a + F_n b,\]and since $(\tfrac{5}{p})=1$, we have that $F_{n+p-1}\equiv F_n\pmod{p}$ by Binet's thereom and Fermat's little theorem.

Let $t$ be the smallest positive integer such that $p\mid F_t$, so $t$ is the order of $\tfrac{1+\sqrt{5}}{1-\sqrt{5}}$ mod $p$, so $t\mid p-1$. Now, if $t\nmid n$, then $\tfrac{F_{n-1}}{F_n}$ can take at most $t-1$ values (since it repeats mod $t$), so it takes at most $p-2$ values, so there is some nonzero value mod $p$ it never achieves. Let this value be $c$.

Take $a=1$, $b\equiv -c\pmod{p}$. Then,
\[x_n = F_{n-1}a + F_n b\equiv F_{n-1}-F_nc\pmod{p}.\]If $t\mid n$, then $F_n\equiv 0\pmod{p}$ and $F_{n-1}\not\equiv 0\pmod{p}$ (else $p\mid F_m$ for all $m$ which is not true), so $p\nmid x_n$. If $t\nmid n$, then $F_n\not\equiv 0\pmod{p}$, so this is never $0$ by the selection of $c$. Thus, these values of $a$ and $b$ yield all $x_n$ relatively prime to $p$, as desired.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Sprites
478 posts
#27 • 2 Y
Y by centslordm, Mango247
Note that \[x_n = F_{n-1}a + F_n b,\]Claim: There is a natural number $b$ such that $b^2=b+1 \pmod{m}$
Proof: We need $(2b-1)^2 \equiv 5 \pmod m$ i.e $5$ is a quadratic residue modulo $m$
Suppose that $m=\prod_{i=1}^{x} {p_i}^{e_i}$
By Hensel's Lemma,we can assure that each congruence has a solution and we can conclude by CRT.(here $f'(x)=8b-4$,and clearly we can choose such an $b$ s.t $ p \nmid 8b-4$ to get a solution.)
Now choose $a=1$ and clearly $x^n \equiv b^n \neq 0 \pmod m$ and $\gcd(x_n,m)=1$(by induction.
This post has been edited 1 time. Last edited by Sprites, Aug 28, 2021, 8:58 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
hakN
428 posts
#28 • 1 Y
Y by centslordm
Solution
This post has been edited 3 times. Last edited by hakN, Oct 2, 2021, 3:58 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
CyclicISLscelesTrapezoid
371 posts
#29 • 4 Y
Y by centslordm, Mango247, Mango247, Mango247
Is this right? This seems like a troll solution.

It's sufficient to construct a sequence mod all primes $p$ dividing $4k^2-5$, then combine them using CRT. If $p \mid 4k^2-5$, then $p$ is odd and $5$ is a quadratic residue $\!\!\!\mod p$. Let $a=1$, and choose $b$ such that $(2b-1)^2 \equiv 5 \pmod{p}$. It's easy to check that this condition forces $\frac{x_4}{x_3}=\frac{3b+2}{2b+1}=b=\frac{x_1}{x_0} \pmod{p}$ if $x_3$ is nonzero $\!\!\!\mod{p}$. Now, we check that $x_1,x_2,x_3 \not\equiv 0 \pmod{p}$:

If $x_1=b \equiv 0 \pmod{p}$, then $(2b-1)^2 \equiv 1 \equiv 5 \pmod{p}$, so $p=2$, a contradiction.
If $x_2=b+1 \equiv 0 \pmod{p}$, then $(2b-1)^2 \equiv 9 \equiv 5 \pmod{p}$, so $p=2$, a contradiction.
If $x_3=2b+1 \equiv 0 \pmod{p}$, then $(2b-1)^2 \equiv 4 \equiv 5 \pmod{p}$, so there are no choices of $p$, a contradiction.

Since $\frac{x_3}{x_0} \equiv \frac{x_4}{x_1} \pmod{p}$, we know that $\frac{x_{n+3}}{x_n} \equiv \frac{x_3}{x_0} \pmod{p}$. Therefore, we can write $x_n=x_i \cdot \left(\frac{x_3}{x_0}\right)^{\left\lfloor \frac{n}{3} \right\rfloor}$, where $i \in \{0,1,2\}$. This is nonzero $\!\!\!\mod{p}$, 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.
awesomehuman
496 posts
#30 • 1 Y
Y by centslordm
Let $p$ be a prime and $p|m$. Note $p$ is odd.

Let $a\equiv 1\pmod{p}$ and $b\equiv k+2^{-1}\pmod{p}$. Assume towards a contradiction $b\equiv 0\pmod{p}$. Then, $2k\equiv -1\pmod{p}$. Then, $5\equiv 4k^2\equiv 1\pmod{p}$, so $p|4$, so $p=2$, a contradiction.

We have $$b^2\equiv k^2+k+2^{-2}\equiv 2^{-2}(4k^2+4k+1)\equiv 2^{-2}(5+4k+1)\equiv 2^{-1}(2k+3)\equiv k+2^{-1}+1\equiv b+1\pmod{p}.$$
We claim $x_n\equiv b^n\pmod{p}$. We will prove it with induction with $n=0, 1$ as the base case. We have
$$x_n\equiv x_{n-1}+x_{n-2}\equiv b^{n-1}+b^{n-2}\equiv b^{n-2}(b+1)\equiv b^n\pmod{p}.$$So, since $b\not \equiv 0\pmod{p}$, none of the $x_n$ are equivalent to $0\pmod{p}$. Thus the whole sequence is relatively prime for $p$.

So, for each prime $p|m$, there exists a residue $b_p$ such that when $x_0\equiv 1\pmod{p}$ and $x_1\equiv b_p\pmod{p}$, $x_i$ is never a multiple of $p$. By the Chinese Remainder Theorem, there exists $B$ such that $B\equiv b_p\pmod{p}$ for all $p|m$. When $a=1$ and $b=B$, the sequence will always be relatively prime to $m$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
IAmTheHazard
5000 posts
#31 • 1 Y
Y by centslordm
Let $a=1$ and $b=2k^2+k-2$.
$$(2k+k-2)^2-(2k+k-2)-1=(4k^2-5)(k^2-k-1) \implies (2k+k-2)^2 \equiv (2k+k-2)+1 \pmod{m} \implies 2k^2+k-2 \perp m \text{ and } x_n \equiv (2k^2+k-2)^n \pmod{m}.~\blacksquare$$
This post has been edited 1 time. Last edited by IAmTheHazard, Mar 15, 2023, 7:26 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
IAmTheHazard
5000 posts
#32 • 1 Y
Y by centslordm
Ok so the motivation of the above solution comes from the fact that for each prime $p$ dividing $m$ we can write $\sqrt{5} \equiv 2k$ and the recursion can be characterized as usual in the form
$$x_n \equiv x\left(\frac{1+2k}{2}\right)^n+y\left(\frac{1-2k}{2}\right)^n$$and it clearly necessary that all of these should be nonzero mod $p$ (in fact by CRT it is also sufficient, so we've reduced the problem to this). The best way to deal with this is to do the stupidest thing possible and set $y=0$ which yields (after adding $4k^2-5$) the above solution.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
awesomeming327.
1664 posts
#33 • 1 Y
Y by centslordm
Note that $5$ is always a quadratic residue of any $p\mid m$. Let $(2k-1)^2\equiv 5\pmod p$ then $p\mid k^2-k-1$. Then pick $a=1$, $b\equiv k\pmod p$, and we see that $x_n\equiv k^n\pmod p$ and by CRT we're done.
This post has been edited 1 time. Last edited by awesomeming327., May 22, 2023, 10:44 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
darshpatel
187 posts
#34
Y by
We show that for each prime divisor $p$ of $m$, we can find some $a_p$ and $b_p$ so that $\left(x_n\right)$ has all its terms nonzero modulo $p$. Let $p$ be a prime divisor of $m$.

If $5$ is a prime divisor of $m$ and $p=5$, we take $a_5=1$ and $b_5=3$. Then $\left(x_n\right)$ repeats $1, 3, 4, 2, 1, 3,\dots$ modulo $5$, with all terms being nonzero.

Now we consider $p\neq 5$. Then $k\not\equiv 0\pmod{p}$, since that would otherwise imply $p\mid 5$. We also note that $p$ is odd, since $2$ does not divide $4k^2-5$. Now let $\alpha\equiv \frac{1+2k}{2}$ motivation We have
\[\alpha^2\equiv \frac{1+4k+4k^2}{4}\equiv \frac{6+4k}{4}\equiv \frac{3+2k}{2}\equiv \alpha + 1\]This also implies $\alpha\not\equiv 0$. Now, let $a_p\equiv 1$ and $b_p\equiv \alpha$. We claim by induction that $x_n\equiv \alpha^n$. We have the base cases $n=0$ and $n=1$ already. Then for the induction step, we have for $n\geq 2$ that
\[x_n\equiv x_{n-1}+x_{n-2}\equiv \alpha^{n-1}+\alpha^{n-2}\equiv \alpha^{n-2}(\alpha+1)\equiv \alpha^{n-2}\alpha^2\equiv \alpha^n\]which completes the induction. Then, since $\alpha\not\equiv 0$, all terms of $\left(x_n\right)$ are nonzero modulo $p$.

Using the Chinese Remainder Theorem, we can guarantee the existence of $a$ and $b$ such that $a\equiv a_p\pmod{p}$ and $b\equiv b_p\pmod{p}$ for all prime divisors $p$ of $m$. This guarantees that $\left(x_n\right)$ will have all its terms not divisible by any prime divisor of $m$, and thus relatively prime to $m$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
bhan2025
96 posts
#35
Y by
An alternative continuation after the
$x_n = x(\frac{1+k}{2})^n + y(\frac{1-k}{2})^n$ construction:

There are at most $p-1$ possible unique modulo $p$ pairs for $((\frac{1+k}{2})^n,(\frac{1-k}{2})^n)$
Each pair eliminates at most $p$ different potential pairs $(x,y)$
We are done as there must be at least one pair leftover
Z K Y
N Quick Reply
G
H
=
a