Join devRant

Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar

Sign Up
Pipeless API

From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API

Learn More
Related Rants

## heres something interesting:

The golden ratio is 1.618...

If you're not familiar with it, doing 1/goldenratio

the result is 0.618...

It gives you back the float component exactly.

Discovered that it is actually part of a series.

First of all:

2-(((5-sqrt(5))/2)-1) =

1.618033988749895 -> thats our golden ratio

In other words:

(2%gold) =

0.381966011250106

While:

((5-sqrt(5))/2) =

1.381966011250105

Ok, now we're getting somewhere. We can turn these into variables

First of all, lets see if we can get the golden ratio back out:

2-(((5-sqrt(5))/2)-1) = 1.618033988749895

Okay good.

The formula looks something like

j-(((i-sqrt(i))/2)-1)

Where j = (i*2)+1

That means we can easily figure out what j we need from our i value. (i-1)/2 = j

We run it back far enough we get

1-(((3-sqrt(3))/2)-1) =

1.3660254037844386

Thats the golden ratios little brother. Doesn't look anything like it, but it is part of the series.

And I found a boat load of research documents scattered *all* over the net, where this number and others in the series inexplicably crop up in power series, in chemistry, and elsewhere. Just looks like random floats if you don't know better.

We can actually go lower in the series:

0.5-(((2-sqrt(2))/2)-1)

1.2071067811865475

At the lowest positive value for j, we get

0-(((1-sqrt(1))/2)-1) = 1

It's kinda elegant.

I even wrote a little script to do the conversions:

def gr(k):

....i = k

....j = (i-1)/2

....return j-(((i-sqrt(abs(i)))/2)-1)

The dots are so devrant doesn't break pythons formatting.

## random

## math