Sums of fours and fives

How many positive integers ≤1000\le 1000 can be written as a sum of some 44s and/or 55s (using one or more terms)? For example, 21=4+4+4+4+521 = 4+4+4+4+5 counts.

Show hints (2)+
  1. Frobenius number of {4,5}\{4,5\} is 4⋅5−4−5=114\cdot5-4-5=11: every integer ≥12\ge 12 is representable.
  2. Count 12..100012..1000 (989989) plus the representable values below 1212 (4,5,8,9,104,5,8,9,10).

Answer

Reveal answer →

994

Create a free account to see the full worked solution and track your progress.

Interview format: Market Maker, Hedge Fund Quant

Related questions