I believe I must incorporate $f_n^2=f_{n-1}f_{n+1}+(-1)^{n+1}$ somehow.

- 272,048

- 41
- 1
- 5
-
2first do some small examples. $2^2 \equiv 1 \pmod 3 ; , ;$ $3^4 \equiv 1 \pmod 5 ; , ; $ $5^2 \equiv 1 \pmod 8 ; ,; $ – Will Jagy Oct 16 '20 at 18:37
-
Thanks, I actually started by doing that but then I started to overthink it – aristotlesdad Oct 16 '20 at 18:41
-
seems to alternate strictly 2,4,2,4,2,4 I have a little order program I wrote for a different purpose, but easy enough ./order 3 5 5 4 = 2^2 \ ./order 5 8 8 2 = 2 // ./order 8 13 13 4 = 2^2 // ./order 13 21 21 2 = 2 // ./order 21 34 34 4 = 2^2 // ./order 34 55 55 2 = 2 // The printout repeats the second number, here that is annoying. – Will Jagy Oct 16 '20 at 19:00
-
How could I convert 2,4,2,4,... into a formula involving $f_n$ and $f_{n+1}$? – aristotlesdad Oct 16 '20 at 19:04
-
I would leave it as is, especially if you can prove it. Note that induction can be done in steps of 2, in this case one induction for odd $n$ and one for even $n$ – Will Jagy Oct 16 '20 at 19:09
-
Beware $ $ The accepted answer has many errors. I added another answer to rectify that. – Bill Dubuque Oct 17 '20 at 01:15
2 Answers
The accepted answer has many errors, so let's give a more careful proof.
First note we must have $\,n \ge 2,\,$ else $\,f_{n+1} = 1\,$ so order isn't defined $\!\bmod f_{n+1}$.
I believe I must incorporate $f_n^2= (-1)^{n+1}f_{n-1}f_{n+1}$ somehow.
Yes, that Cassini identity yields $\,f_n^2\equiv (-1)^{n+1}\pmod{\!f_{n+1}}$
Case $1\!:\ n$ even $\Rightarrow \color{#c00}{f_n^2 \equiv -1}.\,$ If $\,n=2\,$ then $\,f_2 = 1\,$ which has order $1$. Else $\,n\ge 4\,$ so $\,f_{n+1}\ge 3\,$ so $-1\not\equiv 1\pmod{\!f_{n+1}},\,$ so $\,f_n^2\not\equiv 1,\ f_n^4 \equiv (\color{#c00}{f_n^2})^2\!\equiv (\color{#c00}{-1})^2\!\equiv 1,\,$ so $\,f_n\,$ has order $4$ via Order Test.
Case $2\!:\ n$ odd $\Rightarrow f_n^2 \equiv 1\,$ so $\,{\rm ord}\,f_n = 2\,$ by $\,f_n\not\equiv 1,0\pmod{\!f_{n+1}}\,$ by $\,1\! <\! f_n \!<\! f_{n+1}$ for $\,n\ge 3$
In summary: $\,\ {\rm ord}\,f_n\:\!\pmod{\!f_{n+1}} \,=\, \begin{cases} 1\ \ {\rm if}\ \ n = 2\\ 4 \ \ {\rm if}\ \ n \,\text{ is even} \ge 4\\ 2\ \ {\rm if}\ \,n\text{ is}\ \ \, {\rm odd}\, \ge 3\end{cases}$

- 272,048
Cassini's identity $f_n^2=f_{n-1}f_{n+1}+(-1)^{n+1}$ is indeed the key.
$f_n^2=f_{n-1}f_{n+1}+(-1)^{n+1}$ implies $f_n^2 \equiv (-1)^{n+1} \bmod f_{n+1}$. Thus
$f_n^2 \equiv 1 \bmod f_{n+1}$ for $n$ odd
$f_n^2 \equiv -1 \bmod f_{n+1}$ for $n$ even
Therefore,
The order of $f_n^2$ mod $f_{n+1}$ is at most $2$ when $n$ is odd.
The order of $f_n^2$ mod $f_{n+1}$ is $4$ when $n$ is even.
It remains to prove that $f_n \not\equiv 1 \bmod f_{n+1}$ when $n$ is odd. This is easy because $f_n \equiv -f_{n-1} \bmod f_{n+1}$.
In conclusion,
The order of $f_n^2$ mod $f_{n+1}$ is $2$ when $n$ is odd.
The order of $f_n^2$ mod $f_{n+1}$ is $4$ when $n$ is even.

- 216,483