Division by Seven and Modular Arithmetic: The Ultimate Guide

  • Thread starter Thread starter MathematicalPhysicist
  • Start date Start date
  • Tags Tags
    Division
MathematicalPhysicist
Science Advisor
Gold Member
Messages
4,662
Reaction score
372
is really the only way of checking which number is divisble by 7 is by modular arithematics?
 
Physics news on Phys.org
Calculate hcf(n,7). It is a little vague as to what you mean precisely by 'by modulo arithmetic'
 
can you tell me what hfc means?
and by modulo arithematics i mean that i divise the options of a number which is divisble by 7, and i got a blazing shock if ofcourse my way is right, it could be wrong.
 
hcf is highest common factor, found by euclid.

I still can't decipher what you mean. 'divise the options'?
 
loop quantum gravity said:
can you tell me what hfc means?

hfc="highest common factor"=gcd="greatest common divisor"

loop quantum gravity said:
and by modulo arithematics i mean that i divise the options of a number which is divisble by 7, and i got a blazing shock if ofcourse my way is right, it could be wrong.

I have no idea what you mean.

Are you saying you've come up with a test for divisibility by seven? If so, just post it if you want feedback.

There are various tests for divisibility by seven, google will turn up several.
 
shmoe it cannot be that hfc is the same as gcd, at least in a page where iv'e seen a proof that hfc(a,b)=hfc(a,a-b).

and about the test for divisibility, I'm not sure if it's genuine, but i welcome you if you can provide a link to these tests because i might as well just did something which is already known and not new at all.
 
shmoe it cannot be that hfc is the same as gcd, at least in a page where iv'e seen a proof that hfc(a,b)=hfc(a,a-b).

But that equality holds for gcd as well...
 
loop quantum gravity said:
shmoe it cannot be that hfc is the same as gcd, at least in a page where iv'e seen a proof that hfc(a,b)=hfc(a,a-b).

and? gcd(a,b)=gcd(a,a-b) too. greatest common divisor, highest common factor, greatest common factor, highest common divisor, I've seen all these terms used in various number theory books (listed in roughly descending order of frequency) to mean exactly the same thing.
loop quantum gravity said:
and about the test for divisibility, I'm not sure if it's genuine, but i welcome you if you can provide a link to these tests because i might as well just did something which is already known and not new at all.

Just google "divisibility tests for 7" or some variation. There's little point in me going through them looking for tests that may be the same as yours given that I have no clue what I would be looking for.
 
apparetnly i was wrong, there is no way by modulo arithematic to find division by seven, but I am not sure that those algorithms that are at hand are accurate.
anyway, to search through google is really tiresome, and to find something which is simple and comprehesible is very hard.

anyway, i didn't encoutered before, the term hfc so matt grime has confused me a bit.
 
  • #10
hcf, hcf, hcf, repeat after me hcf (not hfc)
 
  • #11
Loop quantam gravity: is really the only way of checking which number is divisble by 7 is by modular arithematics?

There is a test for 7, which consists of: Drop the last digit and multiply it by 2. Then subtract this from the remaining number. If the result is divisible by 7, so is the original number.

I guess an example is not needed but: 861 to 84 to 0, divisible by 7.
 
Last edited:
  • #12
Another, often faster, method is this: Divide the digits of the number into pairs. Determine the difference between the first pair and the next higher multiple of 7. Determine the differnce between the next pair and the previous (lower) multiple of 7. Continue this procedure alternating "next" and "previous" multiple of 7. Form a new number from those digits in reverse. Repeat the procedure on this new number until it is clear that the result is divisible by 7. The original number is divisible by 7 if and only if the result is divisible by 7.

Example: suppose the original number is 8638. The pairs are 86 and 38.
The next multiple of 7 above 86 is 91: the difference is 81- 86= 5. The previous multiple of 7 below 38 is 35: the difference is 38- 35= 3. Using those two digits in reverse gives 35 which is clearly divisible by 7, therefore 8638 is divisible by 7.

If Loop quantum gravity hadn't felt that "anyway, to search through google is really tiresome, and to find something which is simple and comprehesible is very hard", he would have found those two methods on his first two hits.
 
  • #13
HI, i can see that you are joking on my behalf, well i must say that mathforum.org or dot com doesn't interest me anymore, but thank you, you gracious HI, for your helping and teasing on a tired maths student which by mistake has a lot on his mind.
but hey, i guess you have a lot of time on your hand, by counting your posts, more than mine, so you must hve a lot of time in your hands.
 
Back
Top