User blog:Logo12/Number Terrain

So one day I was bored and started to play with again, and eventually got to play with Sounds (http://prntscr.com/4n9ocs).

That thing is a repeating pattern of the last (1s) digit of 2^n, which is known as a 2,4,8,6 pattern. I had been trying to find these repeating pattern of specific numbers since, and I've got 20 in the 10s digit, so:

http://prntscr.com/4n9p14

...40 seconds? Nah, that's too long. Let me merge them....

http://prntscr.com/4n9ply

Better... but it sounds terrible. Maybe some arrangements?

http://prntscr.com/4n9sap

Okay, for the 100s digit.... After some investigation it loops per 100 powers (It also has glide reflection!)

http://prntscr.com/4n9uq7

And the 1000s digit.... It loops for... 500?

http://prntscr.com/4na0p3

Okay, it's too much, and before I have found the pattern, I've found something special about this: All digits (except the last) has an even chance to be any number. So I started to try those numbers stuffs...

http://prntscr.com/4na3m8

This is the distribution of 5^n's digits in the iterations calculated above, which isn't quite clear because of lacking of number data and how MatrixPlot forces the max value to be 1 and others to be colored accordingly to the ratio of max value and the value, which I don't know if they are actually spread evenly or not (it may differ by a tiny digit)

So, I decided to make my own "grid" which involves using Circles (Disks) and with the value on it, while the color would be yellow when spread evenly (1), Green when it is higher than normal (which became blue if it is 10, but it turns out better), and Red when it is lower than normal (or black if 0, just for better vision).

So here is the code:

GraphicsGrid[Map [Function[e, Graphics[{ If[e == 0, Black, Hue[1/6 + Log[e]/6]], Disk[], Text[ Style[e, If[e > 0, Black, White], FontFamily -> "Oetztype", Magnification -> If[IntegerQ[e], 4, 2]]]} ]],  Table[BinCounts[ Table[IntegerDigits[y^i, 10, x]1, {i, x,        x - 1 + 4 5^(x - 1)}], {0, 10}]/(2 5^(-2 + x)), {x, 1, 6}], {2}],  Background -> {, }, ImageSize -> {500, Automatic}]

Okay, this is the original code that shows the distribution thingy, which uses the Oetztype (BTD5 font) for styling.

Here I have an example of 5 from 1st to 8th digit, which I stored because it took ages to finish:

http://prntscr.com/4na5h8

Here's a Matrix Plot for comparison:

http://prntscr.com/4na5lm

(So it is apparently smaller in code size)

Then, to make it easier (lazier way) to set the y (in y^n), I have made an ugly panel thing:

DynamicModule[{y}, Panel[Column[{ Panel[ Column[ {Style["The nth digit of " Dynamic[y]^n, 30, FontFamily -> "Oetztype"], Manipulator[Dynamic[y], {0, 100, 1}, Appearance -> {"Open", Large}, AppearanceElements -> {"StepLeftButton", "StepRightButton", "InputField"}, ImageSize -> Large]}, Alignment -> Center], Background -> Hue[0, 0, 0.8] ],    Dynamic[ GraphicsGrid[Map [Function[e, Graphics[{ If[e == 0, Black, Hue[1/6 + Log[e]/6]], Disk[], Text[Style[e, If[e > 0, Black, White], FontFamily -> "Oetztype", Magnification -> If[IntegerQ[e], 4, 2]]]} ]],       Table[ BinCounts[ Table[IntegerDigits[y^i, 10, x]1, {i, x,             x - 1 + 4 5^(x - 1)}], {0, 10}]/(2 5^(-2 + x)), {x, 1, 6}], {2}],       Background -> {{{Hue[0, 0, .9], Hue[0, 0, .8]}}, }, ImageSize -> {500, Automatic}] ]}, Alignment -> Center], Background -> Hue[0, 0, 0.9]]]

Okay, this code is around 1500 chars, which is the limit of a chat message.

This is the result:

http://prntscr.com/4na6f5

Looks cool enough.

So with this palette set, I decided to call these number terrains.

Here are some classifications:

Classifications

 * Personal opinion

Classification of First 100 Elements
WIP

Special Cases
WIP