+0  
 
0
469
2
avatar

please answer!

 

 Aug 12, 2020
 #1
avatar
+1

a=1; p=0;c=2003%a; if(c==23, goto4, goto6);p=p+1;printp,"-", a; a++;if(a<2000, goto2, 0)

 

OUTPUT:

      n

1 - 30
2 - 33
3 - 36
4 - 44
5 - 45
6 - 55
7 - 60
8 - 66
9 - 90
10 - 99
11 - 110
12 - 132
13 - 165
14 - 180
15 - 198
16 - 220
17 - 330
18 - 396
19 - 495
20 - 660
21 - 990
22 - 1980
 

 Aug 12, 2020
 #2
avatar+118667 
+1

How many natural numbers n have the property that the remainder of dividing 2003 by n is 23?

 

2003-23=1980

I need to find how many numbers bigger than 23 go into 1980

 

factor(1980 = ((2^2*3^2)*5)*11

 

1980 = 11* 5* 3* 3* 2* 2     

 

None of these factors on their own is bigger than 23

 

Look at pairs.

11*2 =22 which is too small, 11*3 and 11*5 are both fine.    So there is 2      (33  and 55)

5 any other than 11 is too small so no more here

 

Let me look at triples

11*2*2=44 is fine so possible multiples of 11 are fine    

11*2*3=66

11*2*5=110

11*3*3=99

11*3*5=165

5 are here

 

5*2*2=20 which is too small, 5*2*3=30, that is ok.   5*3*3=45,   5*3*2=30    are ok    so that is 2 more

3*3*2=18 which is too small, so no more here.

 

Now quads

11*2*2*3=121 that is ok, all quads with 11 are ok        

2*2*3*3=36 which is also ok so all quads are fine. 

 

2*2*3*3=36

2*2*3*5=60

2*2*3*11=132

2*2*5*11=220

2*3*3*5=90

2*3*3*11=198

2*3*5*11=330

3*3*5*11=495

8 of them

 

groups of 5 factors

leave out, 2,3,5 or 11       

4 of them.

 

6 factors

just 1 of them

 

2+5+2+8+4+1= 22

------------------------------

33

55

 

44

66

110

99

165

45

30

 

2*2*3*3=36

2*2*3*5=60

2*2*3*11=132

2*2*5*11=220

2*3*3*5=90

2*3*3*11=198

2*3*5*11=330

3*3*5*11=495

 

Plus 5 more

 Aug 12, 2020
edited by Melody  Aug 12, 2020

2 Online Users

avatar