+0

# help

0
58
9

Consider all positive integers between 3000 and 4000 which, when divided by any of the first three primes, leave a remainder of 1.  Find the sum of all these integers.

Dec 18, 2019

#1
+1

Haven't solved it yet...

though I have some ideas...

the first 3 prime numbers are 2,3,5. 2 would make the number between 3000 and 4000 odd. 5 has two options, 1 at the end of the number, or 6 at the end. 6 at the end is elimanated because of our first restriction. 3 would make the rest of the 3 digits sum up to 2, 5,8,11,14,17,20, 23, and 26. So the numbers that work have to be in the form abc1 where a+b+c=2, 5,8,11,14,17,20, 23, or 26. Thats my idea and I hope this helps.

Dec 18, 2019
#2
+1

a=3;b=0;c=0;d=0;p=0; cycle:n=a*1000+b*100+c*10+d;if(n%2==1 or n%3==1 or d%5==1, goto loop, goto next); loop:printn," ",;p=p+1; next:d++;if(d<10, goto cycle, 0);d=0;c++;if(c<10, goto cycle, 0);d=0;c=0;b++;if(b<10, goto cycle,0);b=0;c=0;d=0;a++;if(a<4, goto cycle,0);print"Total = ",p

OUTPUT:
There are 733 such numbers
Their total sum =2,565,566

P.S. The above code tests each number such as 3001 mod 2, or 3001 mod 3 or 3001 mod 5. If it has a remainder of 1, then it counts it and sums it up.

Dec 18, 2019
edited by Guest  Dec 18, 2019
#3
+106887
+1

Consider all positive integers between 3000 and 4000 which, when divided by any of the first three primes, leave a remainder of 1.

Find the sum of all these integers.

(3000+x) mod 2 = 1     therefore  x is odd

(3000+x)mod 3=1

so

(3000+x) mod6 =1

(3000+x)mod5 =1

so

(3000+x)mod30=1

The smallest number that meets this requirement is   x=1

the next is x=31,

then it goes up by 30.

The numbers will be

3000(1+31+61+ ........ 991)

Sum=3000*34+(1+(1+30)+(1+2*30)+ ........ (1+33*30))

Consider the AP     a=1,  d=30,   n=34,

$$\qquad S_{n}=\frac{n}{2}(a+L)\\ \qquad S_{34}=\frac{34}{2}(1+991)\\ \qquad S_{34}=17*(992)\\ \qquad S_{34}=16864\\$$

Sum= 3000*34+16864 =   118864

I have just reapaired my formulas in red.  Now the answers to this interpretation of the question are the same.

Dec 18, 2019
edited by Melody  Dec 19, 2019
#4
0

Guest Dec 18, 2019
#5
+106887
0

Quite possibly.  What do you base this assertion on?

Melody  Dec 18, 2019
#6
+1

Hi Melody: Guest #4 comment is not me.

There are 1,000 numbers between 3000 and 4000. Their average value is 3,500 per number. So, their maximum sum should not exceed:3,500 x 1000 =3,500,000. Your total sum of 50 592 000 / 1 000 =50 592 per number. Hence the comment by Guest #4.

Take the first 20 numbers: 3001  3003  3004  3005  3006  3007  3009  3010  3011  3013  3015  3016  3017  3019  3021  3022  3023  3025  3026  3027. Each one of the above numbers when tested on mod 2, mod 3 and mod 5 leaves a remainder of 1, hence it must be counted and summed up. At least that is what I understand the question to be. Of course, I could be wrong too.

Dec 18, 2019
#7
+1

I think that the question is badly worded.

The phrase " when divided by any of the first three primes  ", is that to mean  " if any one of them " or is it to mean " each one of them " ?

I'm with Melody's interpretation, that it means each one of them, (each one of them rather than any single one of them).

That gives rise to the sequence 3001, 3031, 3061, 3091, 3121, ... , 3991.

I don't agree with Melody's method of summation though.

(I get a sum of 118,864.)

Dec 18, 2019
#9
+106887
0

Thanks guest, I have fixed mine now.  It was just a silly error on my part.

We are now in agreement.

Melody  Dec 19, 2019
#8
+1

It is very likely that your interpretation and that of Melody are the accurate ones. Hence, there are only 34 such numbers as follows:

3001  3031  3061  3091  3121  3151  3181  3211  3241  3271  3301  3331  3361  3391  3421  3451  3481  3511  3541  3571  3601  3631  3661  3691  3721  3751  3781  3811  3841  3871  3901  3931  3961  3991  Total =  34

Which sum up to a total =118,864.

Dec 18, 2019