Alexander Bass

Math Notes Spring 25

Fibonacci Moduli

For the Fibonacci sequence, defined by F1=1,F2=1,Fn=Fn1+Fn2

I believe the following is true (Haven’t found any counterexamples)

(Fnmodn)0when(nmod6){2,3,4}

Complete Factorization

Quick! what are all the factors of 720 ?

Instead of giving you an answer, here’s an algorithm to find it.

First, by repeated division, find the prime factors.

720/2=360360/2=180180/2=9090/2=4545/3=1515/3=55/5=1 F0=[2,2,2,2,3,3,5]

Find the all unique factors and their cartesian products in F0 to create P0 .

P0={2,3,5,6,10,15,30} S0=P0

Remove one of each unique factor from F0 to make F1 .

F1=[2,2,2,2,3,3,5]

Find the all unique factors and their cartesian products in F1 to create P1 .

P1={2,3,6}

Multiply each number in P1 by each number in S0 to find S1 Remove any duplicate values and remove any values which had been found in previous Sn .

S1={4,6,10,12,20,30,606,9,15,18,30,45,9012,18,30,36,60,90,180}S1={4,10,12,20,60,9,18,45,90,36,180}

Remove one of each unique factor from F1 to make F2 .

F2=[2,2,2,2,3,3,5]

Find the all unique factors and their cartesian products in F2 to create P2 .

P2={2}

Multiply each number in P2 by each number in S1 to find S2 Remove any duplicate values and remove any values which had been found in previous Sn .

S2={8,20,24,40,120,18,36,90,180,72,360}S2={8,24,40,120,72,360}

Remove one of each unique factor from F2 to make F3 .

F3=[2,2,2,2,3,3,5]

Find the all unique factors and their cartesian products in F3 to create P3 .

P3={2}

Multiply each number in P3 by each number in S2 to find S3 Remove any duplicate values and remove any values which had been found in previous Sn .

S3={16,48,80,240,144,720}

Remove one of each unique factor from F3 to make F4 .

F4=[2,2,2,2,3,3,5]

Seeing as there are no more prime factors left in F , Halt. The factors of 720 are found in the union S0,S1,S2,S3 and of course 1 .

S={1}S0S1S2S3S={={1,2,3,4,5,6,8,9,10,12,15,16,18,20,24,30,36,={40,45,48,60,72,80,90,120,144,180,240,360,720={}

I don’t know the name of this algorithm. I figured it out myself, but the simplicity of the algorithm leads me to believe it has been known for quite some time. There are likely more efficient algorithms, but compared to the naive algorithm of dividing by all numbers less than, it is appreciably efficient. An advantage of this algorithm is that it can be done on pen-and-paper and also can be done using a computer.

Squares mod 100

Two neat little identities for squares mod 100.

n2(n+50)2mod100

And

n2(50n)2mod100

These can be algebraically shown to be true

n2(n2+2500+100n)mod100

What about the generic case of a modulus k ? What is the specific m to be added to n to make the squares congruent?

n2(n+m)2modk

Expand

n2(n2+m2+2mn)modk

The trivial case is for m20modk and 2mn0modk . Let’s just ignore the possibility that both of those aren’t true and yet still (m2+2mn)0modk

The smallest natural number m such that 2mn0modk for any integer n is clearly k/2 if k is even, and k if k is odd.

The smallest natural number m such that m20modk is a bit trickier.

m2=k2 Obviously works, but the case of m2=(k/2)2 only works if k is divisible by 4

m=k2 m2=k222 m2k=k4

So for

n2(n+m)2modk

If k is divisible by 4

m=k/2

Otherwise:

m=k