<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Roads of Thought</title>
	<atom:link href="http://roadsofthought.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://roadsofthought.wordpress.com</link>
	<description>From Mathematics to Computer Programming to Chemical Engineering</description>
	<lastBuildDate>Tue, 18 Jan 2011 22:27:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='roadsofthought.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Roads of Thought</title>
		<link>http://roadsofthought.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://roadsofthought.wordpress.com/osd.xml" title="Roads of Thought" />
	<atom:link rel='hub' href='http://roadsofthought.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Project Euler</title>
		<link>http://roadsofthought.wordpress.com/2009/09/08/project-euler/</link>
		<comments>http://roadsofthought.wordpress.com/2009/09/08/project-euler/#comments</comments>
		<pubDate>Tue, 08 Sep 2009 07:13:15 +0000</pubDate>
		<dc:creator>geoffreybernardo</dc:creator>
				<category><![CDATA[Computer Programming]]></category>
		<category><![CDATA[Mathematics]]></category>
		<category><![CDATA[32-bit]]></category>
		<category><![CDATA[fortran]]></category>
		<category><![CDATA[integer]]></category>
		<category><![CDATA[project euler]]></category>
		<category><![CDATA[real number]]></category>

		<guid isPermaLink="false">http://roadsofthought.wordpress.com/?p=3</guid>
		<description><![CDATA[I am taking part in Project Euler, which is a set of mathematical problems, which require the development of algorithms and the writing of computer programs for their solutions. The solution to each problem is a number which has to be typed in on the website. The website keeps track of all the problems that [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=roadsofthought.wordpress.com&amp;blog=9106835&amp;post=3&amp;subd=roadsofthought&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I am taking part in <a href="http://projecteuler.net/index.php?section=about" target="_blank">Project Euler</a>, which is a set of mathematical problems, which require the development of algorithms and the writing of computer programs for their solutions.</p>
<div id="attachment_5" class="wp-caption aligncenter" style="width: 520px"><img class="size-full wp-image-5" title="ProjectEulerHomePage" src="http://roadsofthought.files.wordpress.com/2009/09/projecteulerhomepage1.jpg?w=510&#038;h=285" alt="Home page of Project Euler." width="510" height="285" /><p class="wp-caption-text">Home page of Project Euler.</p></div>
<p>The solution to each problem is a number which has to be typed in on the website. The website keeps track of all the problems that you have solved. Upon the submittal of a correct solution, you are granted access to a forum where you may discuss the method for solving the problem with other successful users.</p>
<p>I started last week Friday and have solved the first two problems so far out of  the current 254 (new problems are added regularly).</p>
<div id="attachment_7" class="wp-caption aligncenter" style="width: 519px"><img class="size-full wp-image-7" title="ProblemsSolved" src="http://roadsofthought.files.wordpress.com/2009/09/problemssolved1.jpg?w=510" alt="Two out of 254 problems solved."   /><p class="wp-caption-text">Two out of 254 problems solved.</p></div>
<p>I plan to use the <a href="http://en.wikipedia.org/wiki/Fortran">Fortran</a> programming language throughout to improve my skills in that langauge. The first two problems were very easy:</p>
<ol>
<li>Find the sum of all multiples of 3 or 5 less than 1000.</li>
<li>Find the sum of all even-valued terms in the <a href="http://mathworld.wolfram.com/FibonacciNumber.html" target="_blank">Fibonacci sequence</a> which do not exceed four million.</li>
</ol>
<p>I simply used Fortran to write simple programs to calculate the sums. The third problem is giving me a headache:</p>
<div id="attachment_9" class="wp-caption aligncenter" style="width: 520px"><img class="size-full wp-image-9" title="Problem3" src="http://roadsofthought.files.wordpress.com/2009/09/problem31.jpg?w=510&#038;h=282" alt="Problematic third problem." width="510" height="282" /><p class="wp-caption-text">Problematic third problem.</p></div>
<p>The reason I have a headache is that <strong>600,851,475,143</strong> is about 300 times larger than the largest integer that a <a href="http://en.wikipedia.org/wiki/32-bit">32-bit computer</a> can hold, <strong>2,147,483,647</strong>.</p>
<p>I had a simple plan for this problem:</p>
<ol>
<li>Translate my prime number generating code from <a href="http://en.wikipedia.org/wiki/Visual_Basic">Visual Basic </a>to Fortran and store it in a program called Primes.f95. <strong><span style="color:#ff0000;">DONE!</span></strong></li>
<li>Write the prime numbers to a text file called Primes.txt. <span style="color:#ff0000;"><strong>DONE!</strong></span></li>
<li>Write another program, PrimeFactor.f95, for calculating the prime factors of an integer fed in by the user.</li>
<li>PrimeFactor.f95 would contain an array, Primes(Size), which would be filled with primes read in from the Primes.txt text file.</li>
<li>The fed-in integer would then be divided by the primes in the Primes(Size) array to find its prime factors.</li>
<li>The largest of the prime factors I would then type into Project Euler and, E Voila!, have three problems solved.</li>
</ol>
<p>One way to get past this is to specify the Primes(Size) array as of the REAL data type, instead of as an integer, because <strong>600,851,475,143 </strong>is miniscule in comparison with the largest real number that a 32-bit computer can hold, 100,000,000,000,000,000,000,000,000,000,000,000,000 or 1E+38 .</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/roadsofthought.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/roadsofthought.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/roadsofthought.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/roadsofthought.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/roadsofthought.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/roadsofthought.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/roadsofthought.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/roadsofthought.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/roadsofthought.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/roadsofthought.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/roadsofthought.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/roadsofthought.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/roadsofthought.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/roadsofthought.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=roadsofthought.wordpress.com&amp;blog=9106835&amp;post=3&amp;subd=roadsofthought&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://roadsofthought.wordpress.com/2009/09/08/project-euler/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fffd92bafcc0c8d002c733674e93602a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">geoffreybernardo</media:title>
		</media:content>

		<media:content url="http://roadsofthought.files.wordpress.com/2009/09/projecteulerhomepage1.jpg" medium="image">
			<media:title type="html">ProjectEulerHomePage</media:title>
		</media:content>

		<media:content url="http://roadsofthought.files.wordpress.com/2009/09/problemssolved1.jpg" medium="image">
			<media:title type="html">ProblemsSolved</media:title>
		</media:content>

		<media:content url="http://roadsofthought.files.wordpress.com/2009/09/problem31.jpg" medium="image">
			<media:title type="html">Problem3</media:title>
		</media:content>
	</item>
	</channel>
</rss>
