Good Rating
This article has a Good rating. This article could use some sprucing up here and there, though! |

**Mocha's Sequence** is generated like so:

- 1,...
- 1,2,... (next power of 2)
- 1,2,4,... (next power of 2)
- 1,2,4,3,... (3 is missing. Put the mean of the leftmost empty region (4 and 2).)
- 1,2,4,3,8,... (next power of 2)
- 1,2,4,3,8,6,... (5, 6, and 7 are missing. Put the mean of the leftmost empty region (8 and 4).)
- 1,2,4,3,8,6,5,... (5 and 7 are missing. Put the mean of the leftmost empty region (6 and 4).)
- 1,2,4,3,8,6,5,7... (7 is missing. Put the mean of the leftmost empty region (8 and 6).)
- 1,2,4,3,8,6,5,7,16... (next power of 2)

And so on.

It was inspired by the order in which I mark lines on my graphs:

- Let n be the number of divisions needed on a graph
- If n mod 2 = 0, divide the axis. Go to 5.
- If n can be written as 2^n+1, move hand as if to divide at 2^n. Move hand opposite direction as if to divide new hypothetical region by 2^(2n). Repeat forever, or until desired accuracy, and then draw line. Go to 5.
- Guess where the line goes.
- Move to the leftmost region that needs lines. If one exists, go to 2. Otherwise, you are DONE!

## m(n)

1,2,4,3,8,6,5,7,16,12,10,9,11,14,13,15,32,24,20,18,17,19,22,21,23,28,26,25,27,30,29,31,64,48,40,36,34,33...

## m^{-1}(n)

1,2,4,3,7,6,8,5,12,11,13,10,...

## Properties

- The the average difference between m(n) and n approaches 4 as n->inf.
- There are an infinite number of n such that m(n)=n. Such an n mod 10 is even for n>1.
- The series is fractal.
- m(2^n)=2^n-1 for n>1
- m(2^n+1)=2^(n+1)
- m(2^n+2)=3*2^(n-1) for n>0