[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math


View post   

File: 119 KB, 672x609, condoms.jpg [View same] [iqdb] [saucenao] [google]
4715444 No.4715444 [Reply] [Original]

You know how if you multiply 9 by any natural number, add up the result's digits, add up that result's digits, and so on, you'll eventually get back to 9?

(Example: 9*31415926 = 282743334, 2+8+2+7+4+3+3+3+4 = 36, 3+6 = 9)

I remember hearing that this works because 9 is one less than 10, the base.

So in any base B, will this always work for B - 1?

Also, what's up with multiplying 3 times any number, doing the same thing, and always coming up with 3, 6, or 9? Is this because 3 is the square root of 9? What's going on here?

>> No.4715491

its on of the unsolved mysteries of math. its the kind of thing math theorists spend their whole lives trying to solve

>> No.4715520

Yes, if a number is divisible by 9, then the sum of it's digits is divisible by 9 (easily proven). The sum of the digits is less than the number. So eventually you'll end up with 9.

>> No.4715568

>>4715520
Well, if it's easily proven for 9 in base 10, I'd assume it's also easily proven for B-1 in base B. Care to give a proof?

Also, what about the 3 thing? If the square root of B-1 is a whole number, does that mean that you'll always end up with a multiple of that square root, like you do with 3 in base 10? What about 3rd roots, etc.?

>> No.4715598

Yes, it's true for all bases. A consequence of Fermat's Little Theorem plus a bit of induction.

>> No.4715604

>>4715598
Huh? Work with me here.

>> No.4715700

>>4715598
> Fermat's little theorem.

No. You don't need that for this. It's almost immediately apparent once you learn basic modular arithmetic.

>> No.4715773
File: 28 KB, 485x329, bump1.jpg [View same] [iqdb] [saucenao] [google]
4715773

>>4715700
bump, I don't know what anyone's talking about

>> No.4716076

I was under the impression that is was true for any factor of (b-1).

>> No.4717989
File: 74 KB, 300x278, shotweb.jpg [View same] [iqdb] [saucenao] [google]
4717989

>>4715700
Yes, that IS Fermat's Little Theorem...

>> No.4718237

>>4717989
You may be right but I don't understand. Doesn't that theorem only deal with primes? I don't see the connection anyway.

>> No.4718265
File: 96 KB, 588x195, math.png [View same] [iqdb] [saucenao] [google]
4718265

How does this work?

>> No.4718296 [DELETED] 

>>4718265
It doesn't. 39 x 39 is not 1521, not 1114.

>> No.4718297 [DELETED] 

>>4718265
It doesn't. 39 x 39 is 1521, not 1114.

>> No.4718300

>>4718265
It doesn't. 39 x 39 is 1521, not 1411.

>> No.4718313

holy shit
let's take a number
45
4 + 5 = 9
45 * 2 = 90
9 + 0 = 9
90 * 2 = 180
1 + 8 + 0 = 9
180 * 2 = 360
3 + 6 + 0 = 9
etc
let's try another number
111111111
1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 = 9
111111111 * 2 = 222222222
2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 = 18
1 + 8 = 2
222222222 * 2 = 444444444
4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 = 36
3 + 6 = 9
what the fuck
fucking nines and shit

>> No.4718319

>>4718313
New multi-million dollar blockbuster:
>The number 9

>> No.4718329

>>4717989
no, retard
10 prime? I don't think so.
It's MUCH simpler.

>> No.4718346

>>4715491
The sum of the digits of a number n written in base b is a multiple of a divisor k of b-1 if and only if n is also a multiple of k. A digit is dividable by a divisor of b^k if and only if the number formed by its last k digits is a multiple of b.

It's quite easy to prove, work it out.

>> No.4718357 [DELETED] 

It's elementary: in tradition base b notation, the digits form coefficient in a polynomial evaluated at b
ie<div class="math">a_n \dots a_1 a_0 = a_n b^n + \cdots + a_1 b^1 + a_0 b^0</div>where each <span class="math">a_i[/spoiler] is a digit less than b
figure out what this is mod <span class="math">b - 1[/spoiler]
spoiler <span class="math">b^i[/spoiler] mod <span class="math">b - 1[/spoiler] is 1

>> No.4718388

It's elementary: in traditional base b notation, the digits form coefficients in a polynomial evaluated at b
ie<div class="math">a_n \dots a_1 a_0=a_n b^n + \cdots + a_1 b^1 + a_0 b^0 \equiv a_n 1^n + \cdots + a_1 1^1 + a_0 1^0 \pmod{b - 1}</div>

>> No.4718535

>>4718388
Huh?

>> No.4718556
File: 28 KB, 640x359, 9s.jpg [View same] [iqdb] [saucenao] [google]
4718556

>> No.4718567
File: 85 KB, 700x628, cerealguycolor.png [View same] [iqdb] [saucenao] [google]
4718567

>>4715444

DEAR RETARDS:

All numbers in base 10 can be expressed be a + 10b + 100c + 1000d + ...

This is the same as 9b + 99c + 999d + ... a + b + c + d + ...

Obviously the first part of that is divisible by 9, so we just check the sum of the digits. If those are divisible by 9, then so is the whole number. Will this work for B-1 in base B? Let's see.

In any arbitrary base, a number is a + Bb + (B^2)c + (B^3)d + ... = (B-1)b + (B^2 - 1)c + ... + a + b + c + d + ...

If the sum of the digits is divisible by B -1, then so is the whole number. So yes OP, it works in any base.

As for 3 in base 10, we apply the same technique as for 9, but check if the sum of the digits is divisible by 3.
In any base, it will work for numbers which are a factor of B-1. In base 10, only 3 is a factor of 9 so that's why the trick works.

>> No.4718823

>>4718567
I'm sorry, but I don't follow.

>> No.4718877

Yes. It will always work. To understand why, consider modular arithmetic. An integers "modulus" or remainder is what's left over after you've divided out a base. For example, 70 = 7 * 9 + 7, so you could say that <div class="math"> 70 \equiv 7 \pmod{9} </div> (In modular arithmetic, the equal sign has three lines instead of two, don't ask me why).
So (mod 9) -14, -5, 4, 13, 22, so on are all considered equivalent because they all differ by multiples of 9. Addition and subtraction works the same, you just add the remainders. Since multiplication is just repeated addition, it also works modulo. For example, <div class="math"> 525 * 727 \equiv 3 * 7 \equiv 21 \equiv 3 (mod 9) </div>
Now when you write a k-digit number in base b, you can write it as.
<div class="math"> \sum_{i = 0}^{k-1} d_i b^i </div> When you take it (mod b-1) you can subtract b-1 from the b underneath the exponent and everything will still be equivalent.

<div class="math"> \sum_{i = 0}^{k-1} d_i (1)^i </div> So it's equivalent to the sum of its digits.

>> No.4718884

>>4718877
A similar trick is that if you add every other number then, subtract the rest of the numbers, you get the remainder when divided by 11.
I.e.
987654321
9-8+7-6+5-4+3-2+1=5
987654321 has a remainder of 5, when divided by 11.

>> No.4718885

fuck this is entry level comp sci shit
fuck off

>> No.4718910
File: 35 KB, 400x301, oh-you_o_208360.jpg [View same] [iqdb] [saucenao] [google]
4718910

OMFG!
>MFW OP's pic is Julian Assange.

>> No.4718922

division algorithm retard

>> No.4718923

>>4718823
>>4718535
>>4718237
>>4715773
>>4715604

he's trolling, abandon topic asap

>> No.4718939

>>4718923
You're right. I never bothered to read the comments, I just kind of got tunnel vision. I really enjoy this because I proved it myself after learning modular arithmetic :) OP's just a fag who can't be bothered to read a wikipedia article. /sci/bros are surprisingly willing to explain concepts to the most ignorant and lazy people.

>> No.4718966

>>4718556

I lol'd

>> No.4720976
File: 147 KB, 430x539, bump15.jpg [View same] [iqdb] [saucenao] [google]
4720976

bump

this issue is thoroughly unresolved