0

If $a$ and $b$ must be nonnegative integers, what is the largest integer $n$ such that $13a + 18b = n$ has no solutions?

I have tried doing the postage stamp method, but this doesn't work with such large numbers. Any help?

Jam
  • 10,325
rd360
  • 97
  • 2
  • 8

2 Answers2

1

The general solution to the equation

$$13a+18b=n$$

where $a,b$ are integers is

$$a=7n+18t$$

$$b=-5n-13t$$

Because of $a\ge 0$,$b\ge 0$ we get $\frac{-5n}{13}\ge t\ge \frac{-7n}{18}$

The largest $n$ such that no $t$ satisfying this inequality is $n=203$ which I checked with PARI/GP :

? for(n=1,10000,if(floor(-5*n/13)<ceil(-7*n/18),print1(n," ")))
1 2 3 4 5 6 7 8 9 10 11 12 14 15 16 17 19 20 21 22 23 24 25 27 28 29 30 32 33 34
 35 37 38 40 41 42 43 45 46 47 48 50 51 53 55 56 58 59 60 61 63 64 66 68 69 71 7
3 74 76 77 79 81 82 84 86 87 89 92 94 95 97 99 100 102 105 107 110 112 113 115 1
18 120 123 125 128 131 133 136 138 141 146 149 151 154 159 164 167 172 177 185 1
90 203
Peter
  • 84,454
-1

It works with postage stamp method.

n= LCM(a,b)-a-b

=> LCM(13,18)-13-18 = 203