Number theory › Remainders › Numbers with given remainders

Smallest n with fewer pencils after a gift

High school · ●●●○○ 50 pts

I have two cents and Bill has nn cents. Bill wants to buy pencils, which come in two packages: one package costs 6 cents for 7 pencils, and the other costs 10 cents for 12 pencils. Bill can spend all nn of his cents on some combination of these packages to get PP pencils. If I give my two cents to Bill, he can instead spend all n+2n+2 of his cents on some combination of these packages to get fewer than PP pencils. Find the smallest value of nn for which this is possible.

Sign in to save your progress.

Diophantine equationsoptimization over integers