Hachette 3D Puzzle Series, vol. 1

Hachette is one of two international publishers selling serialized kits and/or magazines in Japan, which include TV show DVDs, 3D printer kits, drone and robot kits, etc. Hachette actually had a similar 3D puzzles line about 8-9 years ago, which consisted of 50 puzzles that came out one every 2 weeks. I’d missed most of those, and only discovered the series just about the time that it ended. I could only get a couple of the backissue volumes from Kinokuniya bookstore, because all the earlier ones were sold out.

(Game history page, this one for Mancala.)

The current line will only have 18 issues total. The first one is 499 yen ($4.50), which is why I picked it up. The other ones will probably all be about 1,300 yen each. If you get the full subscription right now, you get your choice of one more puzzle plus a copy of Mancala, or the “casino” game (the one where you have a dice box with wooden counters with the numbers 1-9 on them. Rolling a specific number on the dice lets you flip the counter over.)

(Paper puzzles page.)

Each volume will come with a magazine. The first mag is twice as long as the regular ones because it’s advertising for the series. The regular magazines will be shorter and all follow the same pattern. First will be a section on the history of a specific game, then there will be several pages of paper logic puzzles, including magic squares, Sudoku, and elimination grid puzzles (the kind where you are given the names, occupations, and cities of 5 people, plus a list of clues linking them together.) There’s also a classical painting memory game (you look at the painting for a few seconds, then try to answer questions about it from someone else, such as “how many people in the painting?”, “what animal is in the picture?”, “where in the picture is the animal?”, etc. All of the pages are 3-hole punched, so you can store them in a binder.

(Memory puzzle painting.)

Three of the issues are things in the same vein as the Rubik’s cube, where you have to scramble, then unscramble them. One of those looks kind of pretty, so I may get it just based on its looks. However, I normally don’t like those things. One toy is going to be the Tower of Hanoi, and the rest look to be 3D wood puzzles like the ones I’d gotten from capsule ball dispensers last year. In fact, the Hachette line has 3 identical duplications of the capsule ones I already have and another 2 are just fancier versions of the capsule puzzles. Overall, I’m only interested in 7 or 8 of the issues, not including #1, which I already have. The next one I want is #6, which won’t be hitting the shelves until sometime in May, I guess. On the other hand, the magazine cover shows 3 other puzzles that aren’t in the series, so I don’t know how they figure into all of this.

Ok, the toy for vol. 1 is this assembly puzzle. All the pieces are the same, and they form a cube about 2.5″ to a side. The holder has a flat corner so you can display the finished puzzle on-end like a kind of trophy. But, the pieces slide around easily and if the holder gets bumped, you’re going to find yourself trying to pick every single piece up from off the floor. This is going to be like a jigsaw puzzle – lose one piece and the entire thing becomes worthless.

As of this writing, I haven’t tried putting it back together. But, I’ve got a pretty good idea of what the trick is. When I get a free hour, I’ll sit down and see how well I do. As for the paper puzzles in the magazine, there are a couple I want to try, including the Sudoku one, and the elimination grid. If you want to cheat, the solutions for those are at the back of the same issue.

Back to Riemann, Part 7

Before expanding the zeta function to the complex plane, I want to talk about Euler a little more.

Recall the zeta function:

z(x) = 1 + 1/2^x + 1/3^x + 1/4^x…

Euler assumed that x would be small, for -1 < x < 1.

He then defined a function M(x), where there are infinite terms,

M(x) = 1 + x + x^2 + x^3 + x^4…

Then, he multiplied both sides by x,

x*m(x) = x + x^2 + x^3 + x^4 + x^5…

And subtracted both sides, M(x) – x*M(x):

M(x) – x*M(x) = 1 + x – x + x^2 – x^2 + x^3 – x^3 + x^4 – x^4…
M(x) – x*M(x) = 1
M(x)(1 – x) = 1
M(x) = 1/(1 – x)

Ex. M(0.5) = 1/(1 – 0.5) = 2

He followed this up by applying the same approach for x > 1 for the zeta function.

z(x) = 1 + 1/2^x + 1/3^x + 1/4^x…

1/2^x * z(x) = 1/2^x + 1/4^x + 1/6^x + 1/8^x…

1/2^x * z(x) – z(x) = -1 +1/2^x – 1/2^x – 1/^3^x + 1/4^x – 1/4^x – 1/5^x…

z(x)(1 – 1/2^x) = 1 + 1/3^x + 1/5^x + 1/7^x…

This removes all multiples of 2 from the right hand side. Repeating for 1/3^x:

z(x)(1 – 1/2^x)(1 – 1/3^x) = 1 + 1/5^x + 1/7^x + 1/11^x…

Removes all multiples of 2 and 3, etc.

Solving for z(x),

z(x) = (1/(1-1/2^x))*(1/(1-1/3^x))*(1/(1-1/5^x))*(1/(1-1/7^x))…

This is called Euler’s product formula, and it just contains terms with prime numbers in the denominators. And what this does is directly tie the zeta function to the prime numbers. Unfortunately, we’re still faced with the problem of not knowing the distribution of those prime numbers, or what the next one in a very long sequence will be. But, at least now we have a clear connection to the zeta function and the primes.

This probably a good place to talk about zeroes.

For certain polynomials, you can determine their function if you know where they cross the x-axis, and their value when x=0.

Example from the der Veen and de Craats book:
Say you have p(x), with p(2) = p(3) = 0, and p(0) = 1

This is a parabola pointing up, and can be written as:
p(x) = (1 – x/2)*(1 – x/3)
p(x) = 1 – (x*5)/6 + (x^2)/6

Expanding this function for zeroes at all integers 1 through 10,

p(x) = (1 – x/1)(1 – x/2)(1 – x/3)…(1 – x/10)

A simple question now: What’s the coefficient for x?

Answer, this is the component where we just have the a*x term, which is:
x/1 + x/2 + x/3… + x/10
= x*(1 + 1/2 + 1/3 + … + 1/10)

So, Euler assumed that S(x) = sin(pi*x)/pi*x
was a polynomial of infinite degree, with zeroes at …-4, -3, -2, -1, 1, 2, 3, 4…
Basically, all real integers excluding 0. And S(0) = 1.

S(x) = (1 – x/1)(1 – x/(-1))(1 – x/2)(1 – x(-2))(1 – x/3)(1 – x/(-3))…

Because (1 – x/3)(1 – x/(-3)) = (1 – ((x^2)/(3^2)) (1 minus x-squared divided by 3-squared),

S(x) = sin(pi*x)/pi*x = (1 – (x^2)/(1^2))(1 – (x^2)/(2^2))(1 – (x^2)/(3^2))…

If we use the geometric expansion for sin(x),
sin(x) = x – x^3/3! + x^5/5! – x^7/7!…

And substitute pi*x for x,
sin(pi*x) = pi*x – (pi^3)*(x^3)/(3!) + (pi^5)*(x^5)/(5!) – (pi^7)*(x^7)/(7!)…

And divide both sides by pi*x,

sin(pi*x)/(pi*x) = 1 – (pi^2)*(x^2)/(3!) + (pi^4)*(x^4)/(5!) – (pi^6)*(x^6)/7!…

Euler found that the coefficient for x^2 is -(pi^2)/(3!) = -(pi^2)/6.

And, taking the above polynomial for finding the zeroes of S(x), the same coefficient for x^2 is
-x^2(1/1^2 + 1/2^2 + 1/3^2 + 1/4^2)
-1/1^2 – 1/2^2 – 1/3^2 – 1/4^2…

And this is the zeta function for minus zeta(2). That is, the above zeta function, negative, with x=2.

From this Euler concluded that zeta(2) = pi^2/6

der Veen and de Crats say that this isn’t a really rigorous proof, but the end result is correct.
But, by using the same method above, Euler calculated zeta(x) for all even positive integers.
The odd positive integers are much harder, and they don’t work out to be as pretty as for the first few even integers. A little more information on them can be found in the wiki article.

(Image taken from the wiki page.)

The even numbers can also be found using the Bernoulli formula, where B2n is the 2nth Bernoulli number. (Note that because the odd-numbered Bernoulli values, excluding the first 1, equal zero, the above formula doesn’t work for the odd-numbered Zeta integers.)

Anyway. The above approaches let us get the zeta(x) values for the positive integer values for x, which are all non-zero.

Back to Riemann, Part 6

In the last entry, I introduced the prime number counting function, pi(x), and one equation used for approximating it. Remember that pi(x) actually does count the number of prime numbers less than or equal to “x”. But, this is a very slow process, and it doesn’t tell us anything about how the primes are distributed across the real axis. The approximation, x/ln(x), at the least, comes close to pi(x) for sufficiently large values of x. And, the relative error, as given by (pi(x) – x/ln(x))/x goes to zero for large x (there’s still an error, but it’s comparatively small given how many prime numbers we’re really talking about).

Now, we can define any kind of counting function that we like, such as the number of even numbers less than or equal to “x”, the number of odd numbers, or the number of cups of coffee I drink each day of the week. And, if we can plot those numbers, we can try to find an approximation for them in order to predict future events. In cases like with the even numbers, the approximation is going to be 100% accurate (T(x) = x/2, truncated), and the error is going to be 0 for all x. For a function Tc() for counting cups of coffee per day, Tc(x)=Number_of_Days will have an error of +/- 2 depending on how tired I am, but the relative error Tc(x)/x will go to zero for large “x” (that is, for a period of 3 weeks or longer), because I normally only drink one cup a day.

The Russian mathematician Pafnuti Chebyshev, in about 1850, introduced a new logarithmic prime counting function he called psi(x). He defined psi(x) to be the number of prime powers less than or equal to x, but he weighted them based on how frequently they occurred within the range.

psi(x) = T2*ln(2) + T3*ln(3) + T5*ln(5) + T7*ln(7) + T11*ln(11)…

In this case, the T components are counting functions for each prime number. Say we want to look at psi(100).

The powers of 2 less than 100 are: 2, 4, 8, 16, 32 and 64, so T2 = 6.
The powers of 3 less than 100 are: 3, 9, 27 and 81, so T3 = 4.
The powers of 5 less than 100 are: 5 and 25, so T5 = 2.
The powers of 7 less than 100 are: 7 and 49, so T7 = 2.
The powers of all other primes up to 97 occur once only.
After that, T=0 for all primes > 100.

psi(100) = 6*ln(2) + 4*ln(3) + 2*ln(5) + 2*ln(7) + 1*ln(11) + 1*ln(13)…
= 94

The idea here is that although it’s not practical to count the prime powers, this approximation goes to “x” for large values of “x”, and the relative error, (psi(x) – x)/x goes to zero. (Ex.: x = 100, and psi(100) = 94. Rel error = (100-94)/100 = 0.06)

And, psi(x) is going to have pi(x) terms. pi(100) = 25, so there will be 25 terms in psi(100), from T2*ln(2) up to T97*ln(97). psi(x) can be approximated by pi(x)*ln(x), and this is then further proof that pi(x) can be approximated by x/ln(x).

The take away here is that psi(x) is based on the prime numbers themselves, while pi(x) is tied specifically to x and ln(x).

Ok, so let’s go back to the zeta function,
z(x) = 1 + 1/2^x + 1/3^x + 1/4^x…

Euler used a modified form of the zeta function, defined over the range -1 < x < 1, as follows:
M(x) = 1 + x + x^2 + x^3 + x^4…

Now, if you multiply both sides by “x”,
x*M(x) = x + x^2 + x^3 + x^4 + x^5…

And then subtract equation 1 from equation 2, and group the M(x) terms,
M(x) – x*M(x) = 1 + x – x + x^2 – x^2 + x^3 – x^3…

Meuler(x) = 1/(1 – x) for -1 < x < 1 If we plug 2 into the original equation, Moriginal(2) = 1 + 2^2 + 3^2 + 4^2… the series goes to infinity. But, using the identity, Meuler(2) = 1/(1 – 2) = -1, the equation converges. We can use a similar approach with the zeta function. Recall that in its original form, z(x) converges only for x > 1 (so its domain is 1 < x < infinity). We can extend this domain as follows by defining eta(), as invented by Gustav Dirichlet (1805-1859):

eta(x) = 1 – 1/2^x + 1/3^x – 1/4^x + 1/5^x…

The minus signs cause the terms to cancel out faster, and the series then grows more slowly for positive x, even when x < 1.

(Coverage of domains by zeta(x) (top line) and eta(x) (bottom line).)

If we return to the geometric series (which I used to show that e^x is directly related to cos(x) and sin(x)), we get another equation, specifically:

ln(x+1) = x – x^2/2 + x^3/3 – x^4/4 + x^5/5…

Plugging in x = 1,

ln(2) = 1 – 1/2 + 1/3 – 1/4 + 1/5…
eta(1) = 1 – 1/2 + 1/3 – 1/4 + 1/5…
So that eta(1) = ln(2) = 0.693…

and, eta(0.5) = 0.6049…

Ok, what we want is the connection between zeta and eta. First, subtract both sides:

z(x) = 1 + 1/2^x + 1/3^x + 1/4^x…
e(x) = 1 – 1/2^x + 1/3^x – 1/4^x + 1/5^x…

z(x) – e(x) = (1-1) + (1/2^x + 1/2^x) + (1/3^x – 1/3^x)…
z(x) – e(x) = 2/2^x + 2/4^x + 2/6^x…

Factor out 2/2^x = 2^(1-x)

z(x) – e(x) = 2^(1-x) * (1 + 1/x^2 + 1/x^3 + 1/x^4…)
z(x) – e(x) = 2^(1-x) * z(x)

e(x) = z(x) * (1 – 2^(1-x)), or
z(x) = e(x) / (1 – 2^(1-x))

What this means is that, while we can’t find zeta(x) for x between 0 and 1, we can find eta(x) for that range. And, using the conversion formula here, we can map eta(x) to zeta(x) for this same range.

Because eta(x) converges for all real numbers x, with the exception of 1, we can define the behavior of the zeta function for 0 < x < 1. This extends the domain of the zeta function beyond its original 1 < x < infinity.

As an example, eta(0.5) was shown to be 0.6049… above. So,
zeta(0.5) = 0.6049 / (1 – sqrt(2)) = -1.46035…

eta(0) = 0.5
zeta(0) = 0.5 / (-1) = -0.5

The next step is to expand the domain for the zeta function to the complex plane.

Back to Riemann, Part 5

So far, I’ve covered exponents, i, e, ln() and series expansions.

n^x is a continuous line from minus to plus infinity if n is not 0 or 1, and x is a real number.

If n = e, when x = a + bi, then e^x = e^(a+bi) = (e^a) * (cos(b) + i*sin(b))

And, if a=0 and b = pi (3.14159),
e^i*pi = -1

making e^bi the function for drawing the unit circle.

Then, ln(), the natural logarithm, is just the inverse function for e^x.

I kind of jumped from n^x, for any value of n, to e^x. We can convert between them if we want to. If j = n – e, then n^x = (j + e)^x.

And, logb(x) for any base “b” is = ln(x) / ln(b).

Again, why use “e” and ln()? Because they’re easy to work with, they have special properties that other numbers don’t have, such as e^i*pi being on the unit circle, and we can always convert between them and base 10 numbers if we have to.

Why use series expansions? Well, that’s what the zeta function is (1 + 1/2^s + 1/3^s + 1/4^s + 1/5^s…), and some functions that are harder to work with in one form (e^(a+bi)) can be easier to work with in another (e^x = 1 + x + x^2/2! + x^3/3! + x^4/4! + x^5/5!…)

Ok, what’s the point?
So far, I’ve just wanted to lay down the groundwork. It’s now time to look at how everything started, to lead up to the Riemann Hypothesis.

We begin by trying to count the number of prime numbers below a particular limit.

A number is prime if its only factors are itself, and 1. Because 1 is a factor of all other numbers, it is not included in the list of primes. That means that 2, 3, 5 and 7 are the only primes less than or equal to 10. 4 is not prime because its factors are 1, 2 and 4. 6 is not prime because its factors are 1, 2, 3 and 6. 8 is not prime because its factors are 1, 2, 4 and 8. 9 is not prime because its factors are 1, 3 and 9.

We can define a counting function, usually given as:

pronounced “pi”, but is not to be confused with the constant 3.14159. This function counts the number of primes from 2 to x.

pi(10)  = 4
pi(100) = 25
pi(1000) = 168

pi() as a function doesn’t have an equation to it, per se. At least, not just yet. It’s just a matter of sitting down and checking whether every number between 2 and 1000 is prime or non-prime, and then counting up all the ones that are prime.

(Plots here obtained from Wolfram Alpha. Above plot is for pi(10,000).)

What’s important here is to note that the plot of pi() from 2 to 10,000 is not linear. If we want to find some way of getting close at guessing the correct answers for how many primes there are between 100,000 and 199,999, we can’t use an expression in the form of y = n * x, or y = x^n, because they’re going to deviate too much from the real answer given by pi().

We could try using x * 0.125, or x^0.773, which look like they might be getting close to pi() in the range 0 to 10,000:

But, if we expand the range (referred to as changing the domain of the function) to 0 to 10,000,000, both approximations obviously fail.

Instead, it turns out that x/ln(x) works a lot better over the larger domains, and

pi(x) ~ x/ln(x)

is known as the Prime Number Theorem, where the squiggly means that the error between pi(x) and x/ln(x) goes to zero as x goes to infinity.

Remember, pi(x) actually does count the number of primes less than or equal to x, so that’s the truly correct value. But, hand-counting the primes is time consuming, so we want to find an equation that gives us a close approximate answer, and we use x/ln(x) for that.

How do we get the error between reality and the approximation?

error = pi(x) – x/ln(x)

And, we can introduce the idea of “a relative error”, which is (pi(x) – x/ln(x)) / x.

Or, the difference between the counting function pi() and the approximation x/ln(x), divided by x. If the relative error goes to 0 as x goes to infinity, then the number of primes below x is about x/ln(x), for large x.

What this means is that one of the closest methods we have, at the moment, for predicting the distribution of prime numbers is the formula x/ln(x). We’re going to try to find something better.

(Relative error for pi(x) and x/ln(x) from 0 to 1 million.)

Very quickly, one reason people care about prime numbers is that they’re used extensively in securing computer communications and data encryption. If you pick a very large number (150 digits) that is the product of 2 prime numbers, then you can make that number public, and it will be very difficult to determine which two prime numbers make up its factors. That is, it’s easy to test whether a random number is prime, but it’s much, much harder computationally to find the factors of that number. There can be billions of prime numbers that are 100 digits long, and the odds of randomly giving two people the exact same key are very near zero. So, for the moment, public key encryption is considered pretty secure, if you use long enough numbers. However, if there were some way of predicting the distribution of prime numbers exactly, it would become much easier to crack public key systems.

Back to Riemann, Part 4

Ok, let’s get back on topic for e^bi.

Or, maybe not.
I want to look at one more way to calculate e.

The zeta function is generally written as:

z(x) = 1 + 1/2^x + 1/3^x + 1/4^x + 1/5^x…

on into infinity, where x can have the value of a + bi across the complex plane.

If we set x = 1, we get the geometric series, AKA the Harmonic Series:

z(1) = 1 + 1/2 + 1/3 + 1/4 + 1/5…

Which doesn’t converge. It just goes to infinity kind of slowly.

Setting x = 2, however, gives us the series:

z(2) = 1 + 1/2^2 + 1/3^2 + 1/4^2 + 1/5^2…
z(2) = pi^2 / 6 = 1.6449…

I ran the above series in Excel, to 1/177^2, and got 1.6393, which is pretty close.

z(3) = 1 + 1/2^3 + 1/3^3 + 1/4^3 + 1/5^3…
Which approaches 1.202041
z(4) = pi^4/90 = 1.0823…

So, what this says is that the zeta function z(x) converges for x > 1, but it doesn’t converge to 0 (it converges to 1 for large values of x).

There’s also a series that converges to e^x:

e^x = 1 + x + x^2/2! + x^3/3! + x^4/4! + x^5/5!…

Where “!” is the symbol for factorial, or for multiplying the integers from 1 to n together.

2! = 1*2 —– = 2
3! = 1*2*3 — = 6
4! = 1*2*3*4 – = 24
5! = 1*2*3*4*5 = 120

(After only 10 terms, the series is already at 2.71828, and the curve looks flat.)

In the last blog entry, I mentioned that taking the derivative of f(x) = e^x => f'(x) = e^x.
We can prove this by taking the derivative of the series above:

d/dx e^x = d/dx (1 + x + x^2/2! + x^3/3! + x^4/4! + x^5/5!…)

Recall that if f(x) = x^b, then
d/dx f(x) = b * x^(b-1)

Note also that d/dx of a constant = 0.
We can take the derivatives of each term in the series separately, as in:

d/dx (1) = 0
d/dx (x) = 1*x^0 = 1
d/dx (x^2) = 2*x
d/dx (x^3) = 3*x^2
d/dx (x^4) = 4*x^3
d/dx (x^5) = 5*x^4

Plugging the terms back into f'(x),
f'(x) = 0 + 1 + 2*x/(1*2) + 3*x^2/1*2*3 + 4*x^3/1*2*3*4…
f'(x) = 1 + x + x^2/2! + x^3/3! + x^4/4! + x^5/5!…
f'(x) = e^x

What’s interesting about this infinite series approach is that it can also be used to find values for sin(x) and cos(x)

sin(x) = x – x^3/3! + x^5/5! – x^7/7! + x^9/9!…
cos(x) = 1 – x^2/2! + x^4/4! – x^6/6! + x^8/8!…

Now, what happens if we play with e^iy?

e^iy = 1 + iy + (iy)^2/2! + (iy)^3/3! +(iy)^4/4! + (iy)^5/5!…
e^iy = 1 + iy – y^2/2! + iy^3/3! + y^4/4! + iy^5/5! – y^6/6!…

If we group the terms with and without i components together,
e^iy = (1 – y^2/2! + y^4/4! – y^6/6!…) + i(y – y^3/3! + y^5/5!…)

Look at the series expansions for sin() and cos() above.

e^iy = cos(y) + i*sin(y)

And, if we pick y = pi
e^i*pi = cos(pi) + i*sin(pi) = -1 + 0 = -1

What’s this tell us? That e^iy defines the unit circle.

Therefore, e^x, where x = a+bi, gives us e^(a+bi) = (e^a) * (e^bi)
= e^a * (cos(b) + i*sin(b))
(if a=0, e^a  = 1)

(The unit circle as a function of e^bi, which we already saw in Riemann Prose part 7.)

Hanayama Puzzle – Chain

Hanayama is a Japanese producer of metal puzzles. I received this one, called “Chain,” from the U.S. as a Christmas present. On a difficulty ranking of 1 to 6, this one’s rated a 6. But, that’s a bit misleading. If you look at the photo closely, you may figure out the solution visually. This is because there’s an “easy problem” and a “hard problem”.

I’ve written before about how I view wire puzzles as a form of magic trick. A lot of the design revolves around misdirection. If you try to attack the puzzle in what appears to be the more obvious solution, you’re going to fail horribly. You have to sit back, think, and ask yourself, why is this bend where it is? This feature? Why does one piece have this feature, and the others don’t?

After about an hour, I decided to check youtube to see if anyone had posted videos there. The answer was that they had, so I watched the first few seconds of one to get a hint, then went back to the puzzle. The hint didn’t help, so I checked a second video. That didn’t help either. The reason was that the videos were showing the easy approach of the puzzle, and the one I had was assembled for the hard approach from the factory.

The box has a challenge printed on it – “You may be able to take this puzzle apart, but can you put it back together?” Eventually, I realized what the trick was and I could pull the three links apart. Putting the puzzle back together, I quickly verified that there really are 2 variants – the easy approach and the hard one. The interesting thing is that there’s a trick to assembling the hard approach, also. There are many ways to do it wrong, but only one way to do it right, which isn’t intuitive.

I brought Chain with me to a party, and I passed it around to about 10 people there. Even in the easy approach, only one person got it right. I had to show the others how to take it apart, which made them really happy. Then I pulled the old stage magic prank of assembling the puzzle with the hard approach without telling them, and watched their faces as they discovered that even if you know the solution, it still doesn’t help.

If you like puzzles, the Hanamaya collection is challenging, cheap for their weight, and very durable. Recommended to puzzle lovers. (As a note, I can take Chain apart in either approach and reassemble it within 30 seconds now.)

Back to Riemann, Part 3

I’ve already talked about “i” as a placeholder that represents rotation around the origin, and how f(x) = x^z works when z = a + bi across the complex plane. “a” represents changes in magnitude of the vector line drawn from the origin to the point x^(a+bi), and “bi” contributes to the angle of that vector. As “b” varies, the angle varies (the angle is referred to as the “argument” of the function).

So, how does e^i tie into all this? In the last entry, I introduced the natural logarithm ln(), and said that it is the log of base e. And I talked about real exponents from minus to plus infinity. Before we go to the next step, for imaginary exponents of base e, let’s look at “e” a bit more.

Jacob Bernoulli (1655-1705) was a Swiss mathematician. In the early 1680’s he was studying a problem on compound interest. If you have simple interest, then you spend whatever money you make on your investment, and your investment always makes you the same amount each time. That is, $100 at 5% annually is $5. After 10 years, you still have your initial $100 investment, plus the extra $50 in interest which you’d spent on coffee at the end of each year. However, if you put the interest you make back into savings, then you get something like this for those same 10 years:

100 ———— 5
105 ———— 5.25
110.25 ——— 5.5125
115.7625 ——- 5.788125
121.550625 —- 6.07753125
127.6281563 — 6.381407813
134.0095641 — 6.700478203
140.7100423 — 7.035502113
147.7455444 — 7.387277219
155.1328216 — 7.75664108

As can be seen here, you’re making interest on your interest, plus the principle, and the result is that your total net worth goes up. The question, though, is what happens when you calculate the interest monthly rather than annually, or even if you calculate it daily. Bernoulli used the formula:

Which is read as taking the limit of (1 + 1/n) ^ n as “n” goes to infinity. In his example, the account pays 100% interest annually. If the payments are made every 6 months, at 5%, then my formula becomes $100 * (1 + 0.05/2)^2, or $105.06 for the year. Monthly, it’s $100 * (1 + 0.05/12)^12 = $105.10. Granted, it’s not much of an extra gain, but it does show that the more often you calculate interest during the compounding period, the more money you make. So, compounding daily would give you $105.13 in the first year. Now, what Bernoulli did was to use that 100% interest value, and he noticed that the formula tended to reach a limit as “n” went to infinity, specifically, that limit was 2.7182818. (As an approximation, calculating with 100% on one dollar daily for one year, $1 * (1 + 1/365)^365) = 2.707.)

The more general rule is that compounding = e^Rt, where R is the rate as a decimal value (5% => R = 0.05), and t is the number of years you’re going to hold the account.

If the principal is $100, R = 0.05, and we want to save the money for 10 years, the total with compounded interest would be,
y = 100 * e^(0.05 * 10) = $164.87

According to the wiki entry, the first known reference to this constant was in correspondence from Gottfried Leibniz to Christiaan Huygens in 1690 and 1691, where it was given the letter “b”. Leonhard Euler assigned it to the symbol epsilon (e) in 1731 as the base for the natural logarithm, ln().

One of the starting points in teaching calculus is the idea of measuring the area of a curve by summing the areas of rectangles under the curve that all have the same width (I talked about this in the Riemann Prose series, and it’s the basis of what Bernoulli did above in finding e). The larger the number of boxes, the smaller their widths and the closer the sum total gets to the actual area under that curve. When the number of boxes approaches infinity, their widths approach 0, as does their individual areas. Doing this is called taking the derivative of that equation, f(x). So, the derivative of f(x) -> f'(x) = d/dx f(x).

If f(x) = x^2, then the derivative is 2 * x. The derivative of 2 * x is 2. If you drop a rock from the top of a tall building and measure how long it takes to reach the bottom, and you figure that gravity is an acceleration constant of g feet per second per second, then if the rock covers 400 feet in 5 seconds, and:

x = 1/2 * g * t^2
velocity at time t = g * t
acceleration = g

g = 2 * x / t^2 = 2 * 400 / 5^2 = 32 feet per sec^2
velocity = 32 * 5 = 160 feet per second.

The general rule of taking the derivative of an exponential function in the form of x ^ b is to multiply the function by “b”, and subtract 1 from the exponent.

That is:
d/dx of the function f(x) = x^2 is: 2 * x
d/dx of the function f(x) = x^3 is: 3 * x^2

The reason to go through all this is that e^x is a special case.
d/dx e^x = e^x

And, d/dx of ln(x) = 1/x

To put it graphically, when you draw a line through 2 points on a curve (x1,y1) and (x2,y2), the difference between the two points (x2 – x1, y2 – y1) is the slope of that line running through those points. And, as those points get closer together, the line more closely approximates the tangent line to that curve. Therefore, taking the derivative f'(x) of a function f(x) yields the line tangent to that curve at point x. And, the slope of the curve e^x at point x is the line defined by e^x.

(Graph of e^x for 0.1 <= x <= 3.0, and the tangent line for the derivative at an arbitrary point x ~ 2.3.)

Ok, so we now know one way to calculate e, why e is useful, and how to take the derivatives of both e^x and ln(x).

Let’s get back on topic for e^bi.
Next week.

Back to Riemann, Part 2

The idea of exponents is weird, if you think about it. Take the function:

f(x) = n^x

If “n” is positive and greater than 1, then f(x) goes to 0 as x approaches negative infinity, and it goes to infinity very quickly for x-> infinity. There are two special cases: f(x) = 1 for all “n” when x=0; and f(x) = “n” when x=1. But, what’s really happening here?

(n^x for x from -3 to 3, and n=2.)

By definition, n^x is the area of a square when x=2 (n*n), and the volume of a cube when x=3 (n*n*n). When x is a positive integer > 1, then f(x) is simply the result of multiplying “n” by itself x times. By convention, f(x) becomes (1/n)^|x| if x is a negative integer. That is, you’re taking the reciprocal of “n”, and f(x) is then the result of multiplying (1/n) by itself positive x times.

If x is a fraction, such as 1/2, we treat this as taking the root of “n”. In other words, for a square of area 10, what is the length of side “n” that gives us the answer 10 when f(x) = n*n? Answer: f(x) = sqrt(10) = approx. 3.162 (3.162 x 3.162 => 10). For f(x) = 10 = n^(1/3), n = 2.154 (n*n*n = 10).

What initially seems odd about this is that we can take any random fractional root and get a reasonable answer back. This is because 1/2 = 0.5, and 1/3 = 0.33333, and the line drawn by f(x) = 10^x is continuous over the range from 0.33333 to 0.5. Plugging in x = 0.5 works just as well as x = 0.52.

Actually, x=0.52 isn’t that bad, because exponents with the same base are additive, so that 10^0.52 is the same as 10^(0.5) * 10^(0.02) = 10^(1/2) * 10^(1/50), where we multiply the square root of 10 (3.162) by the 50th root of 10 (1.047). But, still. Something like 10^3.14159 looks bizarre to me.

Anyway, negative real numbers work the same way. x = -3.14159 would be like taking the reciprocal of 10 cubed times the reciprocal of the 0.14159th power of 10 (1 / 0.14159 = the 7.06th root, so 10^1/7.06 = 1.385).

The point is that f(x) = n^x is on a continuous curve over minus infinity to plus infinity, for any real value of x.

Now, assume that I have f(x) = 3 = 10^x, and I want to find x. How do I do that?

Yes, this is where logarithms come in.

y = logb(x) for b^y = x.

where b is the base value for the exponential function. That is, if f(x) = 10^2 = 100, then 2 = log10(100).

To answer the above question, for 10^x = 3, log10(3) = x = 0.477, which is just a bit less than one half (1/2.096) (which is reasonable, because 3 is a bit under the square root of 10, so 3 = 10^0.477 makes sense).

What makes logarithms so useful is that while f(x) = 10^x is a curve that gets big really fast, x itself is a straight line with a slope of 1. This means that if you’re working with really big numbers with weird curves, it makes a lot more sense to draw the curves of the logarithms of those numbers.

I’ll end with the introduction of the natural log, or ln(). Keeping in mind that log(1) of any base number = 0 (f(x) = n^0 = 1) , and that log(0) is undefined (because it would mean f(x) = 0^x, which applies to all values of x, or that x is negative infinity), what value of “k” would we need for the area under the curve y=1/x, from x=1 to k, to equal 1?

(I may have drawn the left side of the shaded area a little too far to the right of 1.)

There are several ways to derive this value for k, but the answer at the moment is 2.71828…, and is identified by the constant “e”. Then, with “e” as the base of f(x) = y = e^x, x = loge(y). log base e is the natural logarithm, and is shortened to ln(). And, naturally, ln(e) = 1.

Logs and e also covered in Riemann Prose part 7.

Back to Riemann

(Image from Amazon)

I mentioned about a week ago that I received this book for Christmas. It’s a pretty thin volume, at only 144 pages, with 54 pages dedicated to exercise solutions and the index, but it lays out the math for the Riemann hypothesis clearly enough that I’m getting pretty close to understanding how to put the formulas into Excel this time. So, I’m going to try to write up my thoughts as I go in an attempt to understand everything myself.

This book, compiled by der Veen and de Craats, started out as an online internet course at the University of Amsterdam, aimed at advanced secondary school students to get them interested in university-level math. It includes URLs for a couple free web-based math applications that can be used to help solve some of the exercises, or draw plots of functions of interest. These are: Wolfram Alpha and Sage. The authors make extensive use of Alpha for the book exercises.

When I left off at the end of my Riemann prose series I’d gotten stuck with the fact that the standard representation of Riemann’s zeta function doesn’t work for the region we need it for.

Where “s” is a complex number in the form of s = a + bi. (Later, written as z instead of s.)

If b=0, that is we only look at numbers on the real number line, we get something like the following graph.

This just shows the results of summing “n” from 1 to 11, while calculating “a” from -5 to plus 5. It’s pretty clear from this graph that f(x) is going to infinity fast as “a” goes more negative (a < 0). Even for a=0, summing “n” from 1 to 11, the total reaches 11. Limiting the graph to the portion for a >= 1, we get the next chart.

If a=1, f(1) reaches 3.02. If n goes to infinity, so does f(1). That is, when f(1) = 1/1 + 1/2 + 1/3 + 1/4…, f(1) doesn’t converge. However, when a = 2 or greater, the function does converge. f(2) = 1/1 + 1/4 + 1/9 + 1/16… goes to about 1.6, and larger values of “a” converge closer and closer to 1.

What’s important to take away from this graph at the moment is that f(a) never crosses the x-axis, and therefore there’s never any point at which f(a) = 0. Which is the part we want.

If z (or, “s”) = a + bi for non-zero values of b, what happens? Well, in the previous blog series I’d shown that “i” represents a phase shift, where we can move from the x-axis to the y-axis in the complex plane, and then back.

1 * i = i
i * i = -1
-1 + i = -i
-1 * i = 1

And, x^bi represents a rotation around the origin in the form of x*cos(b) + x*i*sin(b).

So, if z = a + bi, and f(z) = x^z = x^(a + bi),
this is functionally the same as (x^a) * x*(cos(b) + i*sin(b)).

Summing 1 + 1/2^z + 1/3^z + 1/4^z …

where z = a + bi

Just means that we keep using the function n^a * n(cos(b) + i*sin(b)) to get each individual term of f(z), and then add that to the current running total.

If a > 1, we’re going to get a spiral converging on a non-zero point:

And if a < 1, the function goes to infinity.

This is where I’d given up, because the wiki article kept using notation that I had trouble rewriting to fit into Excel. However, the der Veen and de Craats book is very promising. To go any further, I need to cover some of the basics a bit more.

How did Riemann decide on the zeta function in the first place?
What was he trying to prove with the zeta function?
What is the correlation between the zeta function and prime numbers?
If the important part of the zeta curve is where f(z) = 0, and the existing version of the zeta function never equals 0, what do we do to fix things?
What are logs, what is e, and how do they relate to the zeta function?

Current status

Nothing really new to add here this time, science-wise. The weather has been too windy for flying the little drones outside, so I haven’t been able to practice with them at all lately. I don’t have any more synthesizer albums to include in the “now playing” category because I don’t listen to music when working at the computer much anymore, although I did get the Jean Michel Jarre “Equinoxe” CD as a Christmas present and I do have it on my MP3 player for walking to and from work. The thing is, I already included that in a previous “now playing” blog entry.

There probably won’t be anything else new from Gakken for months from now, if not for another year or so. I do have the 9-pin serial to USB adapter cable, but I haven’t had time to sit down with it yet to see if it works with the robot kit (or even if even the robot kit works at all). This is partly because I’ve been busy with work, but also because I’m in the middle of playing Zelda – Mask of Majora in what little free time I can get.

I did receive several books for Christmas as well, including two Cerebus the Aardvark phonebooks (Melmoth and Jaka’s Story), The Riemann Hypothesis by Roland van der Veen and Jan van de Craats, and The Colossal Book of Short Puzzles and Problems by Martin Gardener. I finished the two Cerebus books, which are must-reads for any Cerebus fan, but if you’ve never read this comic before, you really need to start from the beginning; picking it up in the middle will just be confusing. I’ve started reading the Riemann book, which was originally presented as a 4-week educational course for advanced high school kids looking to get into mathematics as a career. The first couple chapters just lay down the groundwork for understanding prime number distribution, derivatives, integration, infinite sums and limits. There are many exercises for readers to apply proofs to various problems, making pretty math-heavy. Some of the exercises use free online math software to draw plots of the prime number distribution curves and infinite sums. It’s a short book, but very deep. I haven’t gotten to the Gardener book yet – that’s absolutely colossal, as said in the title. That’s not a book you carry along to read during your commute on a crowded train.