[-] Shiitake@lemmy.world 2 points 1 year ago

Waaaait a second.

Does that hold for every base, where the divisor is 1 less than the base?

Specifically hexidecimal - could it be that 5 and 3 have the same "sum digits, get divisibility" property, since 15 (=3*5) is one less than the base number 16?

Like 2D~16~ is16*2+13 = 45, which is divisible by 3 and 5.

Can I make this into a party trick?! "Give me a number in hexidecimal, and I'll tell you if it's divisible by 10."

Am thinking it's 2 steps:

  1. Does it end with a 0, 2, 4, 6, 8, A, C, E? Yes means divisible by 2.
  2. Do the digits add up to a multiple of 5 (ok to subtract 5 liberally while adding)? Skip A and F. For B add 1; C->2, D->3, E->4. If the sum is divisible by 5, then original number is too.

So if 1 and 2 are "yes", it's divisible by 10.

E.g.

  • DEADBAE~16~ (=233495470~10~): (1) ends with E, ok. (2) 3+4+3+1+4=15, divisible by 5. Both are true so yes, divisible by 10.
  • C47444~16~ (=12874820~10~): (1) ends with 4, ok. (2) 2+4+7+4+4+4=25, ok.
  • BEEFFACE~16~ (=3203398350): (1) E, ok. (2) 1+4+4+2+4=15, ok.

Is this actually true? Have I found a new party trick for myself? How would I even know if this is correct?

[-] Shiitake@lemmy.world 1 points 2 years ago

Agreed. Updoodled.

20

Ron Swanson meme where he says "I'm a simple man". He's looking at the camera, in a brown suit, with a sexy mustache and very slight smirk. Background is blurry paintings. Caption says "I'm a simple man" at the top and "I see a reply, I upvote it" at the bottom. End description.

Shiitake

joined 2 years ago