Members Login
Username 
 
Password 
    Remember Me  
Post Info TOPIC: Remainders?


Long-term Member

Status: Offline
Posts: 214
Date:
Remainders?
Permalink   


OK...


These types of problems have plagued me enough. Im tired of it, so I am asking yall.


How do you find remainders quickly? with 5, 6, 7, 8, or 9?


example:


24680 / 9 has a remainder of   _____________


I have seen many other variations of it, but I still havent figured out a fast way of doing this


HELP!


 - Zack -



__________________
-- x Signatures are useless --


Administrator

Status: Offline
Posts: 169
Date:
Permalink   

Go here!
 
I don't think you will ever need the rule of dividing by 7, I just put it in the website because I thought it was cool.  Anyway, they are very easy and quick if you know how to do them.

__________________
Webmaster
fht


Long-term Member

Status: Offline
Posts: 208
Date:
Permalink   

Thanks, Mr. Jones! for giving me the chance to find the shortcut for #77.  


I think the most frequently encountered are 9 and 11; for the former, you add all the digits up and the remainder is the same as that of the sum, if you see some numbers add up to 9, cross them out in your head, e.g. 3769382, cross the 9, 3and6, 2and7 out, leaves you with 8 and 3, yielding the remainder of 2. For 11, you subtract the summation of the odd ordinal digits(the 1st, 3rd, 5th, 7th... the direction in which you start counting doesn't matter) from that of the even ordinal digits(2nd, 4th, 6th...), the difference should be the remainder, e.g. 142857: 4+8+7-(1+2+5)=11=0mod11, so 142857 is divisible; 124857: 2+8+7-(1+4+5)=7, thus the remainder is 7.


Look at the last digits for the remainder of 5, and the last 3 digits for 8


Hope it helps and Best Wishes


P.S: Someone please tell me when the next test is scheduled.



__________________
Best Wishes


Administrator

Status: Offline
Posts: 169
Date:
Permalink   

Well, I guess you liked #77.  Whether Mr. White uses it or not, I will not know.  He had asked me to look for other methods to possibly use.  I gave it to him, but I don't know if it will ever show up.  But it is still pretty cool!
 
 

__________________
Webmaster


Senior Member

Status: Offline
Posts: 61
Date:
Permalink   

how 'bout for 6?

__________________
Vinay Ramasesh
fht


Long-term Member

Status: Offline
Posts: 208
Date:
Permalink   

public int remainderBySix(int N){


int summation = the sum of all digits in N;


boolean even = (N%2 == 0);


if(even){


       switch(summation%3){


                case 1: return 4;  case 2: return 2;  default: return 0;}}


else{


       switch(summation%3){


                case 0: return 3;  case 1: return 1;  case 2: return 5; }}}


}


 



__________________
Best Wishes


Long-term Member

Status: Offline
Posts: 214
Date:
Permalink   

Your program would be slightly more accurate had you included break statements...



Thanks for the explanation, though. That trick was one of the few things that wasnt outlined in ELEMENTS OF NUMBER SENSE. So thank you.


-REGARDED!!!-


zack



__________________
-- x Signatures are useless --
fht


Long-term Member

Status: Offline
Posts: 208
Date:
Permalink   

Ah-Oh, I forgot I was writing a program to an expert.


Thanks for the break; statement, though.


See, I really have never seen a problem like "123457 / 6 has a remainder of ___." Most of them time it's "(12 + 34 * 5) / 6 has a remainder of ___." In that case, just figure out the remainder of every term and then do the operations and it's quite simple.


And, As I have asked a few times before, WHEN IS THE NEXT TEST!



__________________
Best Wishes


Administrator

Status: Offline
Posts: 169
Date:
Permalink   

I will do my best to make a test a week, and Zack should have them by Thurs night.  If you find someone else to write tests, you can do more than 1 a week, but like Megan said, they take a while to do.  Therefore, with my very busy work schedule, I can only commit to one a week.  I believe Zack will post them every Friday to my knowledge.

__________________
Webmaster
fht


Long-term Member

Status: Offline
Posts: 208
Date:
Permalink   

As I have said, I would never mean to frustrate you, Mr. Jones. It's just that the tests are so good that I wanted to have it a bit more often. It was just a thought.


So the test would be posted every Friday morning, it seems.


I deeply appreciate what you do for us, Mr. Jones, I won't ask for more anymore.


Best Wishes



__________________
Best Wishes


Senior Member

Status: Offline
Posts: 61
Date:
Permalink   

or you could do this

public int remainderbysix (int n)
{
return n%6;
}



__________________
Vinay Ramasesh
Page 1 of 1  sorted by
 
Quick Reply

Please log in to post quick replies.

Tweet this page Post to Digg Post to Del.icio.us


Create your own FREE Forum
Report Abuse
Powered by ActiveBoard