[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]

/sci/ - Science & Math


View post   

File: 12 KB, 412x367, B-D Pattern.png [View same] [iqdb] [saucenao] [google]
9550158 No.9550158 [Reply] [Original]

Hey Anons, I noticed a mathematical pattern while I was bored today.
Basically, I was trying to find patterns between Base 2 and Base 10 numbers, and I came across something that is shown in the pic I uploaded.
I'm sure this has been found before, I was just wondering if any Anons here have heard of it in the past, or know if there is a name for this, if it is even that significant at all.
Thank you.

>> No.9550177

this is totally new to me i think its pretty nice

>> No.9550184

>>9550177
Are you particularly knowledgeable in mathematics, or are you just a brainlet like 90% of this board?

>> No.9550192

>>9550158
idk if theres a name but it makes sense if you think about it, doubling the magnitude is the same as adding a 0 at the end so in order to get the 101010101010 pattern u have to periodically add a 1

you basically just "discovered" a better intuition for how to move around bits perhaps

>> No.9550195
File: 94 KB, 601x508, 1511293178535.jpg [View same] [iqdb] [saucenao] [google]
9550195

>>9550184

>> No.9550204
File: 39 KB, 457x494, 1507361182033.jpg [View same] [iqdb] [saucenao] [google]
9550204

>>9550184

>> No.9550220

>>9550158
Multiplying by two puts a zero on the right.
Multiplying by two then adding one puts a one on the right.
You are just alternating these operations.
Define f(x)=2x and g(x)=2x+1.
(ffggg)(0) = 11100 in binary.
g represents 1 and f represents 0. Just reflect left and right.
For base 3 you can use 3x, 3x+1, 3x+2.
For base n you use nx, nx+1,..., nx+n-1.
You can call it a pattern but it is pretty much the definition of writing numbers in base n.

>> No.9550340

Interesting. Bump.

>> No.9550343

>>9550158
That's pretty cool

>> No.9550402

>>9550158
It doesn't have a name because it's trivial fact about the bases. You're just figuring out that each digit in binary multiplies the number by two, and that 1 is 1 higher than 0, neither of which should surprise you at all if you know anything about binary.

>> No.9550423
File: 559 KB, 1024x595, scijak.png [View same] [iqdb] [saucenao] [google]
9550423

>>9550158

>> No.9550430

There is a similiar pattern for decimal numbers

1 = 1
10 = (1 x 10) = 10
101 = (10 x 10 + 1) = 101
1010 = (101 x 10) = 1010
10101 = (1010 x 10 + 1) = 10101
101010 = (10101 x 10) = 101010
...

>> No.9550472
File: 109 KB, 588x823, 1513555713174.jpg [View same] [iqdb] [saucenao] [google]
9550472

>>9550158
So how's middle school going for you, OP?

>> No.9550474

>>9550158
I've seen that as an exercise for some beginner java programming course.

>> No.9550511

>>9550472
kek op it's basic binary you stupid brainlet

>> No.9550517

It is commonly used to convert numbers into binary by hand. Divide your decimal number by 2 and write down the remainders. Then do the same with the resulting number until you're at 0. The remainders should be 1s and 0s in a row, that row is the binary number.

>> No.9550533

>>9550220
Better pattern:
[eqn]S_0=1\\S_n=2^n-1-S_{n-1}[/eqn]

>> No.9550538

>>9550533
was meant to say
[eqn]S_1=1\\S_n=2^n-1-S_{n-1}[/eqn]

This also allows us to find what is before the sequence:
S0=-1
S-1=1/2
and so on

>> No.9550659

>>9550192
Yes, exactly. Multiplying by 2 and a bitwise shift left are the same operation in base 2. The same thing of course is true in base 10 when multiplying by 10. It maybe only looks interesting when operations in base 10 are already intuitive and the parallels haven't yet been made for base 2.

>> No.9550681

>>9550158
[math]1_n=1_{10} \\ 10_n=1\cdot n=n \\ 101_n = n\cdot n+1=n^2+1\\
1010_n=n(n^2+1)=n^3+n \\
10101_n=n(n^3+n)+1=n^4+n^2+1 \\ [/math]

"multiply by 10, then multiply by 10 and add 1 and repeat and you get 101010101"

>> No.9550853

How about this one:
[eqn]\lfloor {2^n\over 3}\rfloor[/eqn]

>> No.9550866

>>9550158
just finite approximations of of these rational numbers

[eqn]...010101 = \sum_{n=0}^\infty 4^n = \frac{1}{1-4} = \frac{-1}{3}[/eqn][eqn]...101010 = \frac{-2}{3}[/eqn][eqn]...111111 = ..101010 + ...010101 = -1 [/eqn][eqn]...111111 + 1 = ...0000 = 0[/eqn]

>> No.9550869

also
[eqn]S_{n+1}=2S_n+1-(s_n mod 2)[/eqn]

or this:

[eqn]S_{n+1}=2S_n+1+S_{n-1}-2S_{n-2}[/eqn]

>> No.9550870

>>9550869
oh, made a blunder on the second one. It should read
[eqn]S_{n+1}=2S_n+S_{n-1}-2S_{n-2}[/eqn]

>> No.9550874

>>9550158

nigga this is common knowledge

X << 2 shifts everything to the left, and adds a zero to the end
+1 flips the last bit

so shift twice plus one
X << 2 + 1
adds 01 to the end

so basically you have a 2 step repeating process
X << 1
X << 1 + 1

on the decimalo side that would be
X * 2
X * 2 + 1

this isn't anything special.

the same thing flipped in decimal would be
X * 10
X * 10 + 1

LOOK AT ME HURR I CAN ARRANGE NUMBERS
10101010101110101010101010011010

LEET HAXXOR XDDDDDD

>> No.9550882

>>9550853
I like this.

Perhaps base b generalization is floor(b^n/(b+1))

e.g. floor(10^n/11) for base 10

>> No.9550903

>>9550853
>>9550882
how about a moddafogging CHOMPSKY TYPE 3 GRAMMAR

[eqn] S \rightarrow 1B [/eqn]
[eqn] S \rightarrow 1 [/eqn]
[eqn] B \rightarrow 0S [/eqn]
[eqn] B \rightarrow 0 [/eqn]

>> No.9550914

>>9550903
pretty sweet!

>> No.9550945

>>9550903
This one is a bit less giggly:
[eqn]
S\rightarrow B1\\
S\rightarrow B10\\
B\rightarrow B10\\
B\rightarrow \emptyset [/eqn]

>> No.9550956

>>9550945

you just made it non deterministic

non-terminals need to be on the RIGHT SIDE REEEEEEEEEEEEEEEEEEEEEEE

>> No.9550959

>>9550945

also your substitution of the null set for the epsilon triggers me.

>> No.9550961

>>9550959
desu it's been years since I last did chompsky grammars. I simply forgot what the null symbol was

>> No.9550971

Also: why did I make it non deterministic? It has the same runtime behaviour as yours, just that I don't ping pong between two states for the generation, as it is vaid to append any number of 10s to the left. you just gotta get the starter 1 or 10 settled first.

>> No.9550983

>>9550971
and yes, I'm talking as if it was a turing machine.
but ok, have your will:
[eqn]S\rightarrow1\\
S\rightarrow10B\\
B\rightarrow 10B\\
B\rightarrow1\\
B\rightarrow\epsilon[/eqn]
I hope this now fits your needs, though it is one state longer.

>> No.9550987

>>9550961

lel I had to look it up on wikipedia myself because I wasn't sure anymore

>>9550971
you put the non-termining symbols on the left side, formally making it a type 2, in a type 3 (deterministic) you put the symbols on the right

it's called being a pedantic asshole :)

>> No.9551007

>>9550987
uh, I have an idea:

[eqn]1\rightarrow 10\\
01r\rightarrow 0r\\
start configuration: l1r[/eqn]

>> No.9551012

>>9551007
or just start with ...lllllrrrrr....
and have lr->1

>> No.9551644

>>9550430
lol

>> No.9552313
File: 6 KB, 412x367, Untitled.png [View same] [iqdb] [saucenao] [google]
9552313

this is literally what you sound like