[Verse 1]
Count the numbers one to n
That share no factors with our friend
If greatest common divisor equals one
Then they're coprime, the counting's begun
Phi of n reveals the secret crew
Of integers that make it through
[Chorus]
Euler's totient, counting the coprime
Phi of n, it works every time
When primes divide, subtract their share
Multiply fractions, handle with care
One minus one over p
That's the pattern, can't you see
[Verse 2]
For any prime p standing alone
Phi equals p minus one, full grown
Since primes have no divisors small
Except for one, they dodge them all
But prime powers need a different plan
Subtract the multiples, understand
[Chorus]
Euler's totient, counting the coprime
Phi of n, it works every time
When primes divide, subtract their share
Multiply fractions, handle with care
One minus one over p
That's the pattern, can't you see
[Bridge]
When numbers share no common ground
Multiplication can be found
Phi of m times phi of n
Equals phi of their product then
Split the factors, solve apart
Piece together, mathematical art
[Verse 3]
Take twelve and watch the magic flow
Two and three are primes below
Twelve times half times two-thirds dance
Equals four, not left to chance
One, five, seven, eleven stand
Coprime soldiers, hand in hand
[Chorus]
Euler's totient, counting the coprime
Phi of n, it works every time
When primes divide, subtract their share
Multiply fractions, handle with care
One minus one over p
That's the pattern, can't you see
[Outro]
Product over primes that split
Gives the answer, perfect fit
Euler's function shows the way
Coprime counting, night and day