← All problemsSign in

Mobius Multiplications

The classical Mobius function µ(n) is an important multiplicative function in number theory and combinatorics. µ(n) is defined for all positive integers n and has its values in {-1, 0, 1} depending on the factorization of n into prime factors. It is defined as follows: * µ(n) = 1 if n is a square-free positive integer with an even number of prime factors. * µ(n) = -1 if n is a square-free positi

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start