6

Let $\phi(n)$ denote Euler totient function, $\lambda(n)$ denote Carmichael lambda function. I am studying the quotient $Q(n)=\frac{\phi(n)}{\lambda(n)}$. Indeed, it represents the factor between the order of the multiplicative group $(\mathbb Z/n\mathbb Z)^{*}$ and its exponent (its largest element order).


Its first few values are not that exciting, except when we restrict our attention to the Carmichael numbers $\{561, 1105, 1729, 2465, 2821, 6601, 8911, 10585, 15841, 29341, 41041, 46657, 52633, 62745,\cdots \}$.

Let $Q(\{a,b,\cdots\})$ denote $\{Q(a),Q(b),\cdots\}$, then if we list out the values we get $$Q(\{561, 1105, 1729, 2465, 2821, 6601, 8911, 10585, 15841, 29341\})=\{4,16,36,16,36,4,36,16,36,144,\cdots\}$$ They are all squares of a even number. This led me to think that there is a pattern going on. However, this is not true in general. The pattern breaks at $n=41041$, which $\phi(41041)=28800$ and $\lambda(41041)=120$ for which $Q(41041)=240$. I plotted some values out

enter image description here

Observe that most of the values $Q(n)$ (column D) are perfect squares of a even number, and it looks like that this happen quite often, with this density decreasing as $n$ increases. By that I mean it is more often to have $Q(n)$ to be a square when you randomly pick $n$ small than $n$ large.

There are a few questions I could ask but I'll restrict to this key observation first.


Question Is it true that $Q(n)$ is either a square of a even number or not a perfect square? And why does the density of it being a perfect square decrease?

Any ideas are appreciated.

Brightsun
  • 697
  • 1
  • 9
  • This is an interesting pattern, I hope someone explains it. – Zima Dec 22 '25 at 08:50
  • 1
    If $n$ has at least two distinct odd prime factors or is divisible by $4$ and $> 4$, then $Q(n)$ is even. So $Q(n)$ is odd, and then it is $1$, only for $n = 1, 2, 4, p^k, 2p^k$ with $p$ an odd prime and $k \geqslant 1$. Carmichael numbers are odd, squarefree, and have at least three prime factors. Thus $4 \mid Q(n)$ for all Carmichael numbers. – Dermot Craddock Dec 22 '25 at 10:02

1 Answers1

8

It is always the case that $\phi(n)/\lambda(n)$ is a square for Carmichael numbers with exactly three prime factors. (And most of the initial examples of Carmichael numbers have three prime factors, since that's the least they can have.)

Let $n=p_1p_2p_3$ be the product of three distinct primes, and define $\delta = \gcd(p_1-1,p_2-1,p_3-1)$. If $n$ is a Carmichael number, we claim that $$\gcd(p_1-1,p_2-1) = \gcd(p_1-1,p_3-1) = \gcd(p_1-2,p_3-1) = \delta$$ as well. To see this, let $d = \gcd(p_1-1,p_2-1)$. By Korselt's criterion, we have $d \mid (p_1-1) \mid (p_1p_2p_3-1)$, which means that $d$ also divides $p_1p_2p_3-1 - (p_1-1)(p_2p_3) - (p_2-1)p_3 = p_3 - 1$. (And this argument works for any permutation of the indices.)

In light of this, if we define $q_j = (p_j-1)/\delta$, then $q_1,q_2,q_3$ are pairwise relatively prime. It follows that $\lambda(n) = \mathop{\rm lcm}[p_1-1,p_2-1,p_3-1] = q_1q_2q_3\delta$ and therefore $$\frac{\phi(n)}{\lambda(n)} = \frac{(q_1\delta)(q_2\delta)(q_3\delta)}{q_1q_2q_3\delta} = \delta^2.$$

This (empirically) doesn't automatically extend to products of four or more distinct primes (although there are examples of products of four primes in the OP's table where the quotient happens to be a square anyway).

Greg Martin
  • 94,676