<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>A Recursive Process</title>
	<atom:link href="http://blog.recursiveprocess.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.recursiveprocess.com</link>
	<description>Math teacher seeking patterns.</description>
	<lastBuildDate>Fri, 07 Jun 2013 03:25:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Fractal Brownian Tree</title>
		<link>http://blog.recursiveprocess.com/2013/06/06/fractal-brownian-tree/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=fractal-brownian-tree</link>
		<comments>http://blog.recursiveprocess.com/2013/06/06/fractal-brownian-tree/#comments</comments>
		<pubDate>Fri, 07 Jun 2013 03:25:46 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Full Posts]]></category>
		<category><![CDATA[computer science]]></category>
		<category><![CDATA[fractal]]></category>
		<category><![CDATA[processing]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://blog.recursiveprocess.com/?p=1593</guid>
		<description><![CDATA[@fawnpnguyen whoa. Need to try and make this. &#8212; Dan Anderson (@dandersod) June 4, 2013 I started off and used VPython to create the fractal, but it was slow and buggy. Here&#8217;s a movie of my first attempt. When you &#8230; <a href="http://blog.recursiveprocess.com/2013/06/06/fractal-brownian-tree/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><a href="http://blog.matthen.com/post/52067209233/the-creation-of-a-fractal-brownian-tree"><img class="alignnone size-full wp-image-1601" alt="brownianfractal" src="http://blog.recursiveprocess.com/wp-content/uploads/2013/06/brownianfractal.gif" width="250" height="250" /></a></p>
<blockquote class="twitter-tweet" width="550"><p><a href="https://twitter.com/fawnpnguyen">@fawnpnguyen</a> whoa. Need to try and make this.</p>
<p>&mdash; Dan Anderson (@dandersod) <a href="https://twitter.com/dandersod/statuses/341865942302732288">June 4, 2013</a></p></blockquote>
<p><script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script></p>
<p>I started off and used VPython to create the fractal, but it was slow and buggy. <a href="http://youtu.be/gfJP9CfAkko">Here&#8217;s a movie of my first attempt. When you click you create a new &#8220;seed&#8221; for the fractal to start. </a></p>
<p>So I rewrote it in Processing.org (2.0 just came out!), and the results are far more satisfying. <a href="http://recursiveprocess.com/brownian/">Left click to start a seed, and right click to clear the scene. Check it out!</a></p>
<p><a href="http://blog.recursiveprocess.com/wp-content/uploads/2013/06/screenshot.png"><img class="alignnone size-full wp-image-1605" alt="screenshot" src="http://blog.recursiveprocess.com/wp-content/uploads/2013/06/screenshot.png" width="402" height="424" /></a></p>
<p><a href="http://recursiveprocess.com/brownian/brownianfractal2.pde">Processing source code</a>.</p>
<p><a href="http://recursiveprocess.com/brownian/brownian_motion_2.py">VPython source code.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.recursiveprocess.com/2013/06/06/fractal-brownian-tree/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Painting Puzzler &#8211; Car Talk</title>
		<link>http://blog.recursiveprocess.com/2013/06/02/painting-puzzler-car-talk/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=painting-puzzler-car-talk</link>
		<comments>http://blog.recursiveprocess.com/2013/06/02/painting-puzzler-car-talk/#comments</comments>
		<pubDate>Sun, 02 Jun 2013 10:15:44 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[interesting stuff]]></category>
		<category><![CDATA[painting]]></category>
		<category><![CDATA[puzzler]]></category>

		<guid isPermaLink="false">http://blog.recursiveprocess.com/?p=1591</guid>
		<description><![CDATA[I never could remember how to solve these type of questions. RAY: Tommy, Dougie and I are sitting around the office one day at Car Talk Plaza. We were noticing how dingy the place looked. We&#8217;d been there 15 years, &#8230; <a href="http://blog.recursiveprocess.com/2013/06/02/painting-puzzler-car-talk/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.cartalk.com/content/painting-car-talk-plaza?question">I never could remember how to solve these type of questions</a>. </p>
<blockquote><p>RAY: Tommy, Dougie and I are sitting around the office one day at Car Talk Plaza. We were noticing how dingy the place looked. We&#8217;d been there 15 years, and the place had never been painted. So, we decided to paint Car Talk Plaza.</p>
<p>We didn&#8217;t know which team of us was going to do it, so we sat down and decided to do a little math. We determined that Tommy and I together could paint the entire Car Talk plaza in 10 days. After all, we had a lot of painting experience as kids, having painted Dad&#8217;s car a couple of times with brushes.</p>
<p>Dougie and I could do it in 15 days. And, if Doug and Tom worked together, they could do it in 30 days.</p>
<p>The question is how long would it take each of us, painting by ourselves, to paint the whole of Car Talk Plaza?</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.recursiveprocess.com/2013/06/02/painting-puzzler-car-talk/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Big Ice Cubes</title>
		<link>http://blog.recursiveprocess.com/2013/05/29/big-ice-cubes/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=big-ice-cubes</link>
		<comments>http://blog.recursiveprocess.com/2013/05/29/big-ice-cubes/#comments</comments>
		<pubDate>Wed, 29 May 2013 17:35:06 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[interesting stuff]]></category>
		<category><![CDATA[#wcydwt]]></category>
		<category><![CDATA[Geometry]]></category>

		<guid isPermaLink="false">http://blog.recursiveprocess.com/?p=1582</guid>
		<description><![CDATA[Are big ice cubes worth it? Do they dilute your drink slower? Dr. Drang looks at the math behind it.  This needs some more investigation. Also: sphere icecubes.]]></description>
				<content:encoded><![CDATA[<p><a href="http://thesweethome.com/reviews/the-best-ice-cube-tray/">Are big ice cubes worth it</a>? Do they dilute your drink slower?</p>
<p><a href="http://www.amazon.com/gp/customer-media/product-gallery/B00395FHRO/ref=cm_ciu_pdp_images_3?ie=UTF8&amp;index=3"><img class="alignnone  wp-image-1585" alt="SAMSUNG DIGITAL MOVIE" src="http://blog.recursiveprocess.com/wp-content/uploads/2013/05/51u8DJrIjKL.jpg" width="300" height="225" /><a href="http://www.amazon.com/gp/customer-media/product-gallery/B00395FHRO/ref=cm_ciu_pdp_images_3?ie=UTF8&amp;index=3"><img class="alignnone  wp-image-1584" alt="51yMnsebJRL" src="http://blog.recursiveprocess.com/wp-content/uploads/2013/05/51yMnsebJRL.jpg" width="300" height="205" /></a></a></p>
<p><a href="http://www.leancrew.com/all-this/2013/05/big-ice-cubes/">Dr. Drang looks at the math behind it</a>.  This needs some more investigation. Also: <a href="http://www.amazon.com/Stone-Cask-Ice-Rounds-Chilling/dp/B00B7QJJJ4/ref=pd_sim_k_3">sphere icecubes</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.recursiveprocess.com/2013/05/29/big-ice-cubes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Microsoft Lies? Diagonal Screen Size vs Area</title>
		<link>http://blog.recursiveprocess.com/2013/05/24/microsoft-lies-diagonal-screen-size-vs-area/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=microsoft-lies-diagonal-screen-size-vs-area</link>
		<comments>http://blog.recursiveprocess.com/2013/05/24/microsoft-lies-diagonal-screen-size-vs-area/#comments</comments>
		<pubDate>Fri, 24 May 2013 12:56:14 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Full Posts]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[area]]></category>
		<category><![CDATA[screen size]]></category>

		<guid isPermaLink="false">http://blog.recursiveprocess.com/?p=1574</guid>
		<description><![CDATA[Microsoft has put up an ad comparing various Windows tablets to the iPad. &#160; So bigger is better right? On their original ad they claimed that the ASUS VivoTab Smart tablet had more area than the iPad. But Elliot Temple &#8230; <a href="http://blog.recursiveprocess.com/2013/05/24/microsoft-lies-diagonal-screen-size-vs-area/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Microsoft has <a href="http://windows.microsoft.com/en-us/windows-8/compare#t1=asus-vivotab-smart">put up an ad</a> comparing various Windows tablets to the iPad.</p>
<p><a href="http://blog.recursiveprocess.com/wp-content/uploads/2013/05/2013-05-24_08h46_36.jpg"><img class="alignnone size-full wp-image-1575" alt="2013-05-24_08h46_36" src="http://blog.recursiveprocess.com/wp-content/uploads/2013/05/2013-05-24_08h46_36.jpg" width="1061" height="474" /></a> <a href="http://blog.recursiveprocess.com/wp-content/uploads/2013/05/2013-05-24_08h46_50.jpg"><img class="alignnone size-full wp-image-1576" alt="2013-05-24_08h46_50" src="http://blog.recursiveprocess.com/wp-content/uploads/2013/05/2013-05-24_08h46_50.jpg" width="1011" height="190" /></a></p>
<p>&nbsp;</p>
<p>So bigger is better right? On their original ad they claimed that the ASUS VivoTab Smart tablet had more area than the iPad.</p>
<p>But <a href="http://www.curi.us/1571-lying-microsoft-advertising">Elliot Temple claims the following</a>:</p>
<blockquote><p>How can the screen with a larger diagonal measurement be smaller? Because it’s a different shape. Long and thin gets you a bigger diagonal but a smaller screen, for the same diagonal inches.</p></blockquote>
<p>Who&#8217;s right? Microsoft or Elliot? Great math involved here.</p>
<p>[edit - 5/28/13: This post links in very nicely with the <a href="http://www.mathalicious.com/lesson/viewmongus/">Mathalicious lesson Viewmongous</a>. Thanks <a href="http://twitter.com/fawnpnguyen/status/338934314337173504">Fawn Nguyen</a>!]</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.recursiveprocess.com/2013/05/24/microsoft-lies-diagonal-screen-size-vs-area/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Follow-up to 50 billion app downloads</title>
		<link>http://blog.recursiveprocess.com/2013/05/21/follow-up-to-50-billion-app-downloads/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=follow-up-to-50-billion-app-downloads</link>
		<comments>http://blog.recursiveprocess.com/2013/05/21/follow-up-to-50-billion-app-downloads/#comments</comments>
		<pubDate>Tue, 21 May 2013 16:30:51 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Full Posts]]></category>
		<category><![CDATA[#anyqs]]></category>
		<category><![CDATA[app store]]></category>
		<category><![CDATA[apple]]></category>

		<guid isPermaLink="false">http://blog.recursiveprocess.com/?p=1544</guid>
		<description><![CDATA[Previous post. So 50 billion apps downloaded on the iTunes store has come and gone, and I have nothing to show for it (except for a bunch of fun learning and some excitement for the next time). Things that happened: &#8230; <a href="http://blog.recursiveprocess.com/2013/05/21/follow-up-to-50-billion-app-downloads/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><a href="http://blog.recursiveprocess.com/2013/05/02/50-billion-app-downloads/">Previous post.</a></p>
<p>So 50 billion apps downloaded on the iTunes store has come and gone, and I have nothing to show for it (except for a bunch of fun learning and some excitement for the next time).</p>
<h2>Things that happened:</h2>
<ul>
<li><a href="http://photo180.recursiveprocess.com/?p=849">We made a prediction in class to within 15 min of the actual stopping time.</a></li>
<li>I found the <a href="http://www.apple.com/itunes/store/counters/il6ark7ec.js">javascript file</a> that the counter is checking to keep up to date.</li>
</ul>
<h2>Reasons Why I&#8217;m Excited For The Next Countdown In The App or Music Store:</h2>
<ul>
<li>I&#8217;ll make a script to check the javascript file and get the hourly rates for several days in a row.</li>
<li>Find a function to model the app download rate.</li>
<li>Algebra/Geometry/Pre-Calculus: <a href="http://blog.recursiveprocess.com/2012/02/24/25-billion-from-dan-meyer-anyqs/">Find the rate using the slope secant lines for two data points.</a> Use the data to make a guess for when the store will hit #next# billion.</li>
<li>Calculus: use Riemann sums and definite integrals to approximate the number of apps downloaded in a day, a week, a month, a year. Use the actual app download data for one day to see how find the accuracy of the area underneath the curve.</li>
<li>Can you help me out? Am I missing anything? (answer: yup)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.recursiveprocess.com/2013/05/21/follow-up-to-50-billion-app-downloads/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bill Waterson</title>
		<link>http://blog.recursiveprocess.com/2013/05/20/bill-waterson/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=bill-waterson</link>
		<comments>http://blog.recursiveprocess.com/2013/05/20/bill-waterson/#comments</comments>
		<pubDate>Mon, 20 May 2013 12:04:07 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[interesting stuff]]></category>
		<category><![CDATA[end of year]]></category>
		<category><![CDATA[speech]]></category>

		<guid isPermaLink="false">http://blog.recursiveprocess.com/?p=1557</guid>
		<description><![CDATA[The truth is, most of us discover where we are headed when we arrive. Must read advice from Bill Waterson on Brain Pickings, Maria Popova&#8217;s blog. Your preparation for the real world is not in the answers you’ve learned, but in &#8230; <a href="http://blog.recursiveprocess.com/2013/05/20/bill-waterson/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<blockquote><p>The truth is, most of us discover where we are headed when we arrive.</p></blockquote>
<p><a href="http://www.brainpickings.org/index.php/2013/05/20/bill-watterson-1990-kenyon-speech/">Must read advice from Bill Waterson on Brain Pickings</a>, <a href="http://twitter.com/brainpicker">Maria Popova&#8217;s blog</a>.</p>
<blockquote><p>Your preparation for the real world is not in the answers you’ve learned, but in the questions you’ve learned how to ask yourself.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.recursiveprocess.com/2013/05/20/bill-waterson/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>50 billion app downloads</title>
		<link>http://blog.recursiveprocess.com/2013/05/02/50-billion-app-downloads/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=50-billion-app-downloads</link>
		<comments>http://blog.recursiveprocess.com/2013/05/02/50-billion-app-downloads/#comments</comments>
		<pubDate>Fri, 03 May 2013 02:16:04 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Full Posts]]></category>
		<category><![CDATA[#anyqs]]></category>
		<category><![CDATA[app store]]></category>
		<category><![CDATA[apple]]></category>

		<guid isPermaLink="false">http://blog.recursiveprocess.com/?p=1539</guid>
		<description><![CDATA[Ok. When is it going to hit 50 billion? Put your bets down. Old posts from when Apple was at 25 billion app downloads. More questions: When will it hit 100 billion? 1 trillion? How many apps will be sold &#8230; <a href="http://blog.recursiveprocess.com/2013/05/02/50-billion-app-downloads/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Ok. <a href="http://www.apple.com/itunes/50-billion-app-countdown/">When is it going to hit 50 billion</a>? Put your bets down.</p>
<p><a href="http://blog.recursiveprocess.com/wp-content/uploads/2013/05/20130502-221317.jpg"><img src="http://blog.recursiveprocess.com/wp-content/uploads/2013/05/20130502-221317.jpg" alt="20130502-221317.jpg" class="alignnone size-full" /></a><br />
<a href="http://blog.mrmeyer.com/?p=13083">Old posts from when Apple was at 25</a> <a href="http://blog.recursiveprocess.com/2012/02/24/25-billion-from-dan-meyer-anyqs/">billion</a> <a href="http://vimeo.com/37087956">app</a> <a href="http://vimeo.com/37043206">downloads</a>.<br />
More questions:<br />
When will it hit 100 billion? 1 trillion? How many apps will be sold by December 25th? Any more?</p>
<p>Edit 5/11/13<br />
More info: </p>
<p><a href="http://blog.recursiveprocess.com/wp-content/uploads/2013/05/20130511-141024.jpg"><img src="http://blog.recursiveprocess.com/wp-content/uploads/2013/05/20130511-141024.jpg" alt="20130511-141024.jpg" class="alignnone size-full" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.recursiveprocess.com/2013/05/02/50-billion-app-downloads/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Random Group Maker</title>
		<link>http://blog.recursiveprocess.com/2013/04/18/random-group-maker/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=random-group-maker</link>
		<comments>http://blog.recursiveprocess.com/2013/04/18/random-group-maker/#comments</comments>
		<pubDate>Thu, 18 Apr 2013 13:10:39 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[interesting stuff]]></category>
		<category><![CDATA[teamwork]]></category>

		<guid isPermaLink="false">http://blog.recursiveprocess.com/?p=1525</guid>
		<description><![CDATA[Neat link: Team Maker Allows you to paste in a roster and make random groups. No friction, no mess. Cool stuff.]]></description>
				<content:encoded><![CDATA[<p>Neat link: <a href="http://chir.ag/projects/team-maker/">Team Maker</a></p>
<p>Allows you to paste in a roster and make random groups. No friction, no mess. Cool stuff.</p>
<p><a href="http://blog.recursiveprocess.com/wp-content/uploads/2013/04/2013-04-18_08h54_32.jpg"><img class="alignnone size-full wp-image-1526" alt="2013-04-18_08h54_32" src="http://blog.recursiveprocess.com/wp-content/uploads/2013/04/2013-04-18_08h54_32.jpg" width="787" height="346" /></a> <a href="http://blog.recursiveprocess.com/wp-content/uploads/2013/04/2013-04-18_08h54_411.jpg"><img class="alignnone size-full wp-image-1528" alt="2013-04-18_08h54_41" src="http://blog.recursiveprocess.com/wp-content/uploads/2013/04/2013-04-18_08h54_411.jpg" width="677" height="596" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.recursiveprocess.com/2013/04/18/random-group-maker/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Calculate Pi with Python</title>
		<link>http://blog.recursiveprocess.com/2013/03/14/calculate-pi-with-python/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=calculate-pi-with-python</link>
		<comments>http://blog.recursiveprocess.com/2013/03/14/calculate-pi-with-python/#comments</comments>
		<pubDate>Thu, 14 Mar 2013 17:12:09 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Full Posts]]></category>
		<category><![CDATA[computer science]]></category>
		<category><![CDATA[pi]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://blog.recursiveprocess.com/?p=1516</guid>
		<description><![CDATA[Intro to Computer programming worked at calculating digits of pi today. The actual&#160;algorithms&#160;aren&#8217;t too bad, but getting more than the standard number of digits from a double is a bit trickier. Here&#8217;s a program that calculates pi using: Bailey–Borwein–Plouffe formula &#8230; <a href="http://blog.recursiveprocess.com/2013/03/14/calculate-pi-with-python/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Intro to Computer programming worked at calculating digits of pi today. The actual&nbsp;algorithms&nbsp;aren&#8217;t <strong>too</strong> bad, but getting more than the standard number of digits from a double is a bit trickier. Here&#8217;s a program that calculates pi using:</p>
<p><a href="http://en.wikipedia.org/wiki/Bailey%E2%80%93Borwein%E2%80%93Plouffe_formula"><strong>Bailey–Borwein–Plouffe formula</strong></a><br />
<img class="alignnone" alt="" src="http://upload.wikimedia.org/math/4/8/f/48f7653d58f4ad747327d271ed789415.png" width="437" height="47" /></p>
<p><a href="http://en.wikipedia.org/wiki/Bellard%27s_formula"><strong>Bellard&#8217;s formula</strong></a><br />
<img class="alignnone" alt="" src="http://upload.wikimedia.org/math/d/b/f/dbf2d4355c108f6b3388985be4976799.png" width="813" height="54" /><br />
and<br />
<a href="http://en.wikipedia.org/wiki/Chudnovsky_algorithm"><strong>Chudnovsky algorithm</strong></a><br />
<img class="alignnone" alt="" src="http://upload.wikimedia.org/math/8/2/6/826dc7788dba249ee86fc0135e06b035.png" width="405" height="50" /></p>
<p>Holy smokes is Chudnovsky algorithm&#8217;s fast!</p>
<pre>			 Plouff 		 Bellard 			 Chudnovsky
Iteration number  1   3.133333333333333333333333   3.141765873015873015873017   3.141592653589734207668453
Iteration number  2   3.141422466422466422466422   3.141592571868390306374053   3.141592653589793238462642
Iteration number  3   3.141587390346581523052111   3.141592653642050769944284   3.141592653589793238462642
Iteration number  4   3.141592457567435381837004   3.141592653589755368080514   3.141592653589793238462642
Iteration number  5   3.141592645460336319557021   3.141592653589793267843377   3.141592653589793238462642
Iteration number  6   3.141592653228087534734378   3.141592653589793238438852   3.141592653589793238462642
Iteration number  7   3.141592653572880827785241   3.141592653589793238462664   3.141592653589793238462642
Iteration number  8   3.141592653588972704940778   3.141592653589793238462644   3.141592653589793238462642
Iteration number  9   3.141592653589752275236178   3.141592653589793238462644   3.141592653589793238462642
Iteration number  10   3.141592653589791146388777   3.141592653589793238462644   3.141592653589793238462642
Iteration number  11   3.141592653589793129614171   3.141592653589793238462644   3.141592653589793238462642
Iteration number  12   3.141592653589793232711293   3.141592653589793238462644   3.141592653589793238462642
Iteration number  13   3.141592653589793238154767   3.141592653589793238462644   3.141592653589793238462642
Iteration number  14   3.141592653589793238445978   3.141592653589793238462644   3.141592653589793238462642
Iteration number  15   3.141592653589793238461733   3.141592653589793238462644   3.141592653589793238462642
Iteration number  16   3.141592653589793238462594   3.141592653589793238462644   3.141592653589793238462642
Iteration number  17   3.141592653589793238462641   3.141592653589793238462644   3.141592653589793238462642
Iteration number  18   3.141592653589793238462644   3.141592653589793238462644   3.141592653589793238462642
Iteration number  19   3.141592653589793238462644   3.141592653589793238462644   3.141592653589793238462642</pre>
<h2>Source code (Python)</h2>
<pre>from decimal import *

#Sets decimal to 25 digits of precision
getcontext().prec = 25

def factorial(n):
    if n<1:
        return 1
    else:
        return n * factorial(n-1)

def plouffBig(n): #http://en.wikipedia.org/wiki/Bailey%E2%80%93Borwein%E2%80%93Plouffe_formula
    pi = Decimal(0)
    k = 0
    while k < n:
        pi += (Decimal(1)/(16**k))*((Decimal(4)/(8*k+1))-(Decimal(2)/(8*k+4))-(Decimal(1)/(8*k+5))-(Decimal(1)/(8*k+6)))
        k += 1
    return pi

def bellardBig(n): #http://en.wikipedia.org/wiki/Bellard%27s_formula
    pi = Decimal(0)
    k = 0
    while k < n:
        pi += (Decimal(-1)**k/(1024**k))*( Decimal(256)/(10*k+1) + Decimal(1)/(10*k+9) - Decimal(64)/(10*k+3) - Decimal(32)/(4*k+1) - Decimal(4)/(10*k+5) - Decimal(4)/(10*k+7) -Decimal(1)/(4*k+3))
        k += 1
    pi = pi * 1/(2**6)
    return pi

def chudnovskyBig(n): #http://en.wikipedia.org/wiki/Chudnovsky_algorithm
    pi = Decimal(0)
    k = 0
    while k < n:
        pi += (Decimal(-1)**k)*(Decimal(factorial(6*k))/((factorial(k)**3)*(factorial(3*k)))* (13591409+545140134*k)/(640320**(3*k)))
        k += 1
    pi = pi * Decimal(10005).sqrt()/4270934400
    pi = pi**(-1)
    return pi
print "\t\t\t Plouff \t\t Bellard \t\t\t Chudnovsky"
for i in xrange(1,20):
    print "Iteration number ",i, " ", plouffBig(i), " " , bellardBig(i)," ", chudnovskyBig(i)


</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.recursiveprocess.com/2013/03/14/calculate-pi-with-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Powers of 2 without a Zero</title>
		<link>http://blog.recursiveprocess.com/2013/03/06/powers-of-2-without-a-zero/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=powers-of-2-without-a-zero</link>
		<comments>http://blog.recursiveprocess.com/2013/03/06/powers-of-2-without-a-zero/#comments</comments>
		<pubDate>Wed, 06 Mar 2013 17:56:43 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[calculate this]]></category>
		<category><![CDATA[computer science]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.recursiveprocess.com/?p=1507</guid>
		<description><![CDATA[2^86 is largest known pwr of 2 that does not contain 0.What about other digits?Does each non-zero digit occur inf often among the pwrs of 2? &#8212; James Tanton (@jamestanton) March 6, 2013 Interesting. The Intro to Programming Students gave &#8230; <a href="http://blog.recursiveprocess.com/2013/03/06/powers-of-2-without-a-zero/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<blockquote class="twitter-tweet" width="550"><p>2^86 is largest known pwr of 2 that does not contain 0.What about other digits?Does each non-zero digit occur inf often among the pwrs of 2?</p>
<p>&mdash; James Tanton (@jamestanton) <a href="https://twitter.com/jamestanton/status/309333132358873089">March 6, 2013</a></p></blockquote>
<p><script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script></p>
<p>Interesting. The Intro to Programming Students gave a crack at this one; and after 30 minutes all were close and half had it. Some worked in Python (easier large numbers and string manipulation) and some in Java (muuuuch faster). Here&#8217;s my Java (BlueJ) code. It checks all powers of 2 up to 2^10,000, and then it prints out the counts of all the digits 0-9. The digits are spread out pretty evenly.</p>
<pre>
import java.math.BigInteger;
public class Powersof2
{
    public int[] digits = new int[11];;
    public Powersof2()
    {
        BigInteger number = new BigInteger ("1");;
        int power = 1;
        
        for (int i = 0; i < digits.length; i++)
        {
            digits[i]=0;
        }
        
        while (power <= 10000)
        {
            number = number.multiply(new BigInteger ("2"));
            
            if (HasAZeroInIt(number))
            {
                System.out.println("Next power of 2 is " + number + " with an exponent of " + power);
            }
            
            
            power += 1;
        }
        
        for (int i = 0; i < digits.length-1; i++)
        {
            System.out.println("index " + i + " and number of digits is " + digits[i]);
        }
                   
       
    }
    
    public boolean HasAZeroInIt(BigInteger n)
    {
        String strn = String.valueOf(n);
        
        int index = 0;
        while (index < strn.length())
        {
            digits[Character.getNumericValue(strn.charAt(index))] += 1;
            index += 1;
        }
        index = 0;
        while (index < strn.length())
        {
            if (strn.charAt(index) == '0')
            {
                return false;
            }
            index += 1;
        }
        return true;
    }    
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.recursiveprocess.com/2013/03/06/powers-of-2-without-a-zero/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
