## Saturday, September 30, 2017

### Making Turtle pictures with Numbers made from Numbers

The post Random Walks with Number Digits looked at pictures made from the digits of numbers. Go through each digit in turn. If it is 0 take a step to the right. If it is one go 36 degrees down from that. If it is 2 72 degrees etc etc. For base ten numbers this makes a picture that looks like brownian motion but with only 10 directions not any possible direction.

In this post I look at numbers made from numbers.

The Copeland–Erdős constant is made by sticking together all the prime numbers into a number 2 then 3 then 5 then 7 then 11 etc.. 0.235711131719232931374143 A033308. One of these turtle logo pictures made from this number has a very odd pattern. With 1.5 million digits from prime numbers this pattern is made. The Copeland–Erdős constant is normal so I would expect the loop to eventually come back around.

Champernowne constant is made with 1 then 2 then 3 then 4 etc.. 0.12345678910111213141516 makes a similar picture but it is much more curvy. 600k digits looks like

## Thursday, September 28, 2017

### Random Walks with Number Digits

Say you took each digit of a number and used that to decide which direction to take a step. What path would you follow?

Similar to last post I took Pi, e, Sqrt(2) and random numbers. I multiplied each digit by 36. There are 10 digits to go into the 360 degrees you can go. For 0 step right. For 1 36 degrees down from 0. For 2 72 degrees etc.

Here are the pictures with a description of which number made each at the end. If any look different that might be an indication the digits are not that random.

.

After drawing this I realised it looked like Dragon Curves. Googling Pi pictures and Golden curves revealed this book. so someone had the idea before.

My code for all these pictures is here. The picture is on reddit and people seemed to like it.

And now other numbers

E first 700k

e next million

Sqrt(2)

Using a random number generator, just for comparison

Catalan Constant

These look like pictures of brownian motion which in effect they are.

## Wednesday, September 27, 2017

### Pi Digits High Low Game

Suppose you take a long number and for each digit if it is bigger then the previous one increase a counter by one. If it is less then the previous number reduce the counter by one. You keep a running total and graph that total. Noting when it passes 0. This total number will go up and down and can get to zero many times. If you play this game with random numbers in a million digits on average the number of times you will have crossed 0 is 1594.4 and the standard deviation of the number of times crossed 0 is 1207.3. Though as the number of times zero is crossed cannot be less then 0 this is a bit odd.
```       ```
import random

numcrossed=[]
j=0
while j < 200:
i = 0
last=0
total=0
x=[]
y=[]
crossed=0
while i < 1000000:
ran= random.randint(0, 10)
if ran==last:
total=total
elif ran>last:
total=total+1
else:
total=total-1
if total==0:
x.append(i)
y.append(total)
crossed=crossed+1
i=i+1
last=ran
numcrossed.append(crossed)
j=j+1
```
```
If instead of random numbers the digits of pi are used. This is what the path of total counts looks like
```       ```
file = open("pi1000000.txt", "r")
#3.14159265358979323846264338327950 pi2.txt
x = []
y = []

pi = list(text)
total =0
i = 0
crossed=0
i=0

while i < len(pi):
if pi[i]>pi[i-1]:
#print(pi[i])
total=total+1
if pi[i]
``````
``` Pi has a 0 total 657 times. Which is more than 51 out of 200 random million long sequences did in my tests. None of this means anything. Going up or down based on digits in a base ten number but i like these pattern sort of sequences. E crosses 0 1725 times sqrt2 crosses 0 1300 times and with 2 million digits The python code for visualisation is import numpy as np import matplotlib.pyplot as plt plt.scatter(x, y, alpha=0.5, color='green') plt.title('Sqrt 2 High Low Game') plt.show() ```
``` Posted by Iamreddave at 1:18 PM No comments: Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest Labels: math, Maths, python ```
``` ```
``` ```
``` ```
``` Newer Posts Older Posts Home Subscribe to: Posts (Atom) ```
``` ```
``` ```
``` if (typeof Meebo == 'undefined') { Meebo=function(){(Meebo._=Meebo._||[]).push(arguments)}; (function(q){ var d=document,b=d.body; if(!b){var cb=arguments.callee;return setTimeout(function(){cb(q)},100);} var m=b.insertBefore(d.createElement('div'), b.firstChild), s=d.createElement('script'); m.id='meebo'; m.style.display='none'; m.innerHTML='<iframe id="meebo-iframe" frameBorder="0" ></iframe>'; s.src='http'+(q.https?'s':'')+'://'+(q.stage?'stage-':'')+'cim.meebo.com/cim/cim.php?network='+q.network; d.getElementsByTagName('head')[0].appendChild(s); })({network: 'liveatthewitchtrials_hu21qi', stage: false}); Meebo('makeEverythingSharable'); } Labels screwing the inscrutable (90) Funny Ha Ha (85) Science (69) economics (68) Maths (53) prediction (49) Rant (44) Geek (21) Prediction markets (21) security (19) progress (17) review (16) business plan (13) law (12) glpk (10) Homemade ventilator (8) hacking (8) quiz (8) Ruby (7) lottery (6) Long Now (5) PPX (5) analyticsx (4) collison (4) Rubik's (3) About Me Iamreddave View my complete profile Stuff Beer + Knitting Real Wealth A World Wide Web of Electricity Our Friends Electric Gruntled Ginno megalithomania Watson Tricks Blog Archive ►  2019 (6) ►  March (2) ►  February (2) ►  January (2) ►  2018 (1) ►  January (1) ▼  2017 (18) ►  December (1) ►  October (6) ▼  September (3) Making Turtle pictures with Numbers made from Numb... Random Walks with Number Digits Pi Digits High Low Game ►  April (3) ►  January (5) ►  2016 (8) ►  June (1) ►  May (2) ►  April (1) ►  March (1) ►  January (3) ►  2015 (30) ►  December (1) ►  November (5) ►  October (5) ►  September (3) ►  June (1) ►  May (2) ►  April (5) ►  March (3) ►  February (5) ►  2014 (9) ►  November (4) ►  October (1) ►  August (1) ►  June (1) ►  March (1) ►  January (1) ►  2013 (1) ►  November (1) ►  2012 (31) ►  December (6) ►  November (4) ►  October (1) ►  September (2) ►  August (1) ►  July (2) ►  June (2) ►  May (2) ►  April (3) ►  March (1) ►  February (2) ►  January (5) ►  2011 (39) ►  December (7) ►  November (6) ►  October (1) ►  September (1) ►  August (6) ►  July (1) ►  June (6) ►  May (2) ►  March (3) ►  February (5) ►  January (1) ►  2010 (28) ►  December (1) ►  November (1) ►  October (3) ►  September (7) ►  August (1) ►  July (3) ►  June (1) ►  May (3) ►  March (4) ►  February (1) ►  January (3) ►  2009 (43) ►  December (1) ►  November (4) ►  October (4) ►  September (4) ►  August (1) ►  July (1) ►  June (3) ►  May (2) ►  April (7) ►  March (5) ►  February (7) ►  January (4) ►  2008 (78) ►  December (3) ►  November (6) ►  October (2) ►  September (1) ►  August (1) ►  July (5) ►  June (6) ►  May (7) ►  April (10) ►  March (13) ►  February (12) ►  January (12) ►  2007 (112) ►  December (6) ►  November (9) ►  October (6) ►  August (5) ►  July (4) ►  June (16) ►  May (26) ►  April (8) ►  March (12) ►  February (13) ►  January (7) ►  2006 (32) ►  December (5) ►  November (22) ►  October (5) ```
``` ```
``` ```
``` ```
``` ```
``` Simple theme. Powered by Blogger. ```
``` ```
``` ```
``` ```
``` window.setTimeout(function() { document.body.className = document.body.className.replace('loading', ''); }, 10); window['__wavt'] = 'AOuZoY4NWgRiosFsb6j_O3OKR1d0ysJeLw:1558399567410';_WidgetManager._Init('//www.blogger.com/rearrange?blogID\x3d36234687','//liveatthewitchtrials.blogspot.com/2017/09/','36234687'); _WidgetManager._SetDataContext([{'name': 'blog', 'data': {'blogId': '36234687', 'title': 'Live at the Witch Trials', 'url': 'http://liveatthewitchtrials.blogspot.com/2017/09/', 'canonicalUrl': 'http://liveatthewitchtrials.blogspot.com/2017/09/', 'homepageUrl': 'http://liveatthewitchtrials.blogspot.com/', 'searchUrl': 'http://liveatthewitchtrials.blogspot.com/search', 'canonicalHomepageUrl': 'http://liveatthewitchtrials.blogspot.com/', 'blogspotFaviconUrl': 'http://liveatthewitchtrials.blogspot.com/favicon.ico', 'bloggerUrl': 'https://www.blogger.com', 'hasCustomDomain': false, 'httpsEnabled': true, 'enabledCommentProfileImages': true, 'gPlusViewType': 'FILTERED_POSTMOD', 'adultContent': false, 'analyticsAccountNumber': '', 'encoding': 'UTF-8', 'locale': 'en', 'localeUnderscoreDelimited': 'en', 'languageDirection': 'ltr', 'isPrivate': false, 'isMobile': false, 'isMobileRequest': false, 'mobileClass': '', 'isPrivateBlog': false, 'feedLinks': '\x3clink rel\x3d\x22alternate\x22 type\x3d\x22application/atom+xml\x22 title\x3d\x22Live at the Witch Trials - Atom\x22 href\x3d\x22http://liveatthewitchtrials.blogspot.com/feeds/posts/default\x22 /\x3e\n\x3clink rel\x3d\x22alternate\x22 type\x3d\x22application/rss+xml\x22 title\x3d\x22Live at the Witch Trials - RSS\x22 href\x3d\x22http://liveatthewitchtrials.blogspot.com/feeds/posts/default?alt\x3drss\x22 /\x3e\n\x3clink rel\x3d\x22service.post\x22 type\x3d\x22application/atom+xml\x22 title\x3d\x22Live at the Witch Trials - Atom\x22 href\x3d\x22https://www.blogger.com/feeds/36234687/posts/default\x22 /\x3e\n', 'meTag': '', 'adsenseHostId': 'ca-host-pub-1556223355139109', 'adsenseHasAds': false, 'ieCssRetrofitLinks': '\x3c!--[if IE]\x3e\x3cscript type\x3d\x22text/javascript\x22 src\x3d\x22https://www.blogger.com/static/v1/jsbin/1961721879-ieretrofit.js\x22\x3e\x3c/script\x3e\n\x3c![endif]--\x3e', 'view': '', 'dynamicViewsCommentsSrc': '//www.blogblog.com/dynamicviews/4224c15c4e7c9321/js/comments.js', 'dynamicViewsScriptSrc': '//www.blogblog.com/dynamicviews/3392fbbd1a294fe9', 'plusOneApiSrc': 'https://apis.google.com/js/plusone.js', 'disableGComments': true, 'sharing': {'platforms': [{'name': 'Get link', 'key': 'link', 'shareMessage': 'Get link', 'target': ''}, {'name': 'Facebook', 'key': 'facebook', 'shareMessage': 'Share to Facebook', 'target': 'facebook'}, {'name': 'BlogThis!', 'key': 'blogThis', 'shareMessage': 'BlogThis!', 'target': 'blog'}, {'name': 'Twitter', 'key': 'twitter', 'shareMessage': 'Share to Twitter', 'target': 'twitter'}, {'name': 'Pinterest', 'key': 'pinterest', 'shareMessage': 'Share to Pinterest', 'target': 'pinterest'}, {'name': 'Email', 'key': 'email', 'shareMessage': 'Email', 'target': 'email'}], 'disableGooglePlus': true, 'googlePlusShareButtonWidth': 300, 'googlePlusBootstrap': '\x3cscript type\x3d\x22text/javascript\x22\x3ewindow.___gcfg \x3d {\x27lang\x27: \x27en\x27};\x3c/script\x3e'}, 'hasCustomJumpLinkMessage': false, 'jumpLinkMessage': 'Read more', 'pageType': 'archive', 'pageName': 'September 2017', 'pageTitle': 'Live at the Witch Trials: September 2017'}}, {'name': 'features', 'data': {'sharing_get_link_dialog': 'true', 'sharing_native': 'false'}}, {'name': 'messages', 'data': {'edit': 'Edit', 'linkCopiedToClipboard': 'Link copied to clipboard!', 'ok': 'Ok', 'postLink': 'Post Link'}}, {'name': 'template', 'data': {'name': 'Simple', 'localizedName': 'Simple', 'isResponsive': false, 'isAlternateRendering': false, 'isCustom': false, 'variant': 'pale', 'variantId': 'pale'}}, {'name': 'view', 'data': {'classic': {'name': 'classic', 'url': '?view\x3dclassic'}, 'flipcard': {'name': 'flipcard', 'url': '?view\x3dflipcard'}, 'magazine': {'name': 'magazine', 'url': '?view\x3dmagazine'}, 'mosaic': {'name': 'mosaic', 'url': '?view\x3dmosaic'}, 'sidebar': {'name': 'sidebar', 'url': '?view\x3dsidebar'}, 'snapshot': {'name': 'snapshot', 'url': '?view\x3dsnapshot'}, 'timeslide': {'name': 'timeslide', 'url': '?view\x3dtimeslide'}, 'isMobile': false, 'title': 'Live at the Witch Trials', 'description': '', 'url': 'http://liveatthewitchtrials.blogspot.com/2017/09/', 'type': 'feed', 'isSingleItem': false, 'isMultipleItems': true, 'isError': false, 'isPage': false, 'isPost': false, 'isHomepage': false, 'isArchive': true, 'isLabelSearch': false, 'archive': {'year': 2017, 'month': 9, 'rangeMessage': 'Showing posts from September, 2017'}}}]); _WidgetManager._RegisterWidget('_NavbarView', new _WidgetInfo('Navbar1', 'navbar', document.getElementById('Navbar1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_HeaderView', new _WidgetInfo('Header1', 'header', document.getElementById('Header1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_BlogView', new _WidgetInfo('Blog1', 'main', document.getElementById('Blog1'), {'cmtInteractionsEnabled': false, 'lightboxEnabled': true, 'lightboxModuleUrl': 'https://www.blogger.com/static/v1/jsbin/839950701-lbx.js', 'lightboxCssUrl': 'https://www.blogger.com/static/v1/v-css/368954415-lightbox_bundle.css'}, 'displayModeFull')); _WidgetManager._RegisterWidget('_HTMLView', new _WidgetInfo('HTML1', 'sidebar-right-1', document.getElementById('HTML1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_LabelView', new _WidgetInfo('Label1', 'sidebar-right-1', document.getElementById('Label1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_ProfileView', new _WidgetInfo('Profile1', 'sidebar-right-2-1', document.getElementById('Profile1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_LinkListView', new _WidgetInfo('LinkList1', 'sidebar-right-2-2', document.getElementById('LinkList1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_BlogArchiveView', new _WidgetInfo('BlogArchive1', 'sidebar-right-3', document.getElementById('BlogArchive1'), {'languageDirection': 'ltr', 'loadingMessage': 'Loading\x26hellip;'}, 'displayModeFull')); _WidgetManager._RegisterWidget('_AttributionView', new _WidgetInfo('Attribution1', 'footer-3', document.getElementById('Attribution1'), {}, 'displayModeFull')); ```