A student at Harvard named Kevin

Was counting his stones by 11

He messed up n times

And instead counted 9s

And wound up at 2007.

To be precise, Kevin divides 2007 stones into groups of 11 stones and 9 stones, where n of the groups have 9 stones in them. How many values of n could make this limerick true?

mathhdude124 May 9, 2019

#1**+1 **

n=1; x=1;d=0;cycle:a = (9*n +11*x); if(a==2007, goto5, goto6);printa,"=", x," ", n;x++;if(x<200, goto cycle,discard=0;x=1;n++;if(n<300, goto cycle,0)

a x n

1 = 180 3

2 = 171 14

3 = 162 25

4 = 153 36

5 = 144 47

6 = 135 58

7 = 126 69

8 = 117 80

9 = 108 91

10 = 99 102

11 = 90 113

12 = 81 124

13 = 72 135

14 = 63 146

15 = 54 157

16 = 45 168

17 = 36 179

18 = 27 190

19 = 18 201

20 = 9 212

Guest May 10, 2019