2023 AIME II Problem 15
Problem 15 of 15HarderNumber TheoryArithmetic
For each positive integer let be the least positive integer multiple of such that Find the number of positive integers less than or equal to that satisfy
Your answer
Integer from 0 to 999
Show solution
Solution
Write where is the unique integer in with i.e. the inverse of mod Reducing mod shows so exactly when which happens exactly when the binary digit of weight in is
Since setting gives so and every with is the reduction of mod In binary, occupies positions of each -bit block of Since is odd, keeps digit equal to and complements every digit in positions through
So for the digit of weight is exactly when Among the residue occurs times and the residues occur times each, for a total of
Tagged: modular arithmetic · number base · multiplicative order