<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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: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>Comments on: Euler 5</title>
	<atom:link href="http://justrakudoit.wordpress.com/2011/06/23/euler-5/feed/" rel="self" type="application/rss+xml" />
	<link>http://justrakudoit.wordpress.com/2011/06/23/euler-5/</link>
	<description>I Never Metaop I Didn&#039;t Like</description>
	<lastBuildDate>Thu, 07 Mar 2013 12:58:07 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Tim Bollman</title>
		<link>http://justrakudoit.wordpress.com/2011/06/23/euler-5/#comment-2616</link>
		<dc:creator><![CDATA[Tim Bollman]]></dc:creator>
		<pubDate>Fri, 24 Jun 2011 04:43:36 +0000</pubDate>
		<guid isPermaLink="false">http://justrakudoit.wordpress.com/?p=364#comment-2616</guid>
		<description><![CDATA[Correction on the ranges that don&#039;t start with 1.  It should be ceil(min / power) &lt;= floor(max / power).  Doesn&#039;t have to be a prime; silly me.]]></description>
		<content:encoded><![CDATA[<p>Correction on the ranges that don&#8217;t start with 1.  It should be ceil(min / power) &lt;= floor(max / power).  Doesn&#039;t have to be a prime; silly me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: colomon</title>
		<link>http://justrakudoit.wordpress.com/2011/06/23/euler-5/#comment-2615</link>
		<dc:creator><![CDATA[colomon]]></dc:creator>
		<pubDate>Fri, 24 Jun 2011 00:54:11 +0000</pubDate>
		<guid isPermaLink="false">http://justrakudoit.wordpress.com/?p=364#comment-2615</guid>
		<description><![CDATA[Thanks!]]></description>
		<content:encoded><![CDATA[<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim Bollman</title>
		<link>http://justrakudoit.wordpress.com/2011/06/23/euler-5/#comment-2614</link>
		<dc:creator><![CDATA[Tim Bollman]]></dc:creator>
		<pubDate>Fri, 24 Jun 2011 00:36:08 +0000</pubDate>
		<guid isPermaLink="false">http://justrakudoit.wordpress.com/?p=364#comment-2614</guid>
		<description><![CDATA[I can.  Whether or not I explain it well is another story :P.

The english description of the algorithm is &quot;find and multiply the largest power of every prime that is less than or equal to the maximum of the range&quot;.

We&#039;re basically saying that we don&#039;t care what the actual numbers are for the lcm, we just care about the largest prime powers that fit in the range.  And since multiplying two primes can&#039;t make the number smaller, we know that if 2**5 won&#039;t fit, neither will 2**5 times anything else.  And if 2**2*3 fits, so will both 2**2 and 3.  So basically if a composite exists in the range the largest prime power it can have is also in the range (since it has to be at least half as big).

This actually kind of works for ranges that don&#039;t start with 1 too.  If the power is in the range, you&#039;re done.  Otherwise you have to backtrack down through smaller powers until you find one that has a prime in (min .. max) / power.]]></description>
		<content:encoded><![CDATA[<p>I can.  Whether or not I explain it well is another story <img src='http://s2.wp.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> .</p>
<p>The english description of the algorithm is &#8220;find and multiply the largest power of every prime that is less than or equal to the maximum of the range&#8221;.</p>
<p>We&#8217;re basically saying that we don&#8217;t care what the actual numbers are for the lcm, we just care about the largest prime powers that fit in the range.  And since multiplying two primes can&#8217;t make the number smaller, we know that if 2**5 won&#8217;t fit, neither will 2**5 times anything else.  And if 2**2*3 fits, so will both 2**2 and 3.  So basically if a composite exists in the range the largest prime power it can have is also in the range (since it has to be at least half as big).</p>
<p>This actually kind of works for ranges that don&#8217;t start with 1 too.  If the power is in the range, you&#8217;re done.  Otherwise you have to backtrack down through smaller powers until you find one that has a prime in (min .. max) / power.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: colomon</title>
		<link>http://justrakudoit.wordpress.com/2011/06/23/euler-5/#comment-2613</link>
		<dc:creator><![CDATA[colomon]]></dc:creator>
		<pubDate>Thu, 23 Jun 2011 19:11:01 +0000</pubDate>
		<guid isPermaLink="false">http://justrakudoit.wordpress.com/?p=364#comment-2613</guid>
		<description><![CDATA[Woah.  Can you explain why that works?  I don&#039;t know if it&#039;s over-tiredness or just general denseness on my part, but I can&#039;t think of any obvious reason it ought to work, and it certainly does...]]></description>
		<content:encoded><![CDATA[<p>Woah.  Can you explain why that works?  I don&#8217;t know if it&#8217;s over-tiredness or just general denseness on my part, but I can&#8217;t think of any obvious reason it ought to work, and it certainly does&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim Bollman</title>
		<link>http://justrakudoit.wordpress.com/2011/06/23/euler-5/#comment-2612</link>
		<dc:creator><![CDATA[Tim Bollman]]></dc:creator>
		<pubDate>Thu, 23 Jun 2011 18:42:09 +0000</pubDate>
		<guid isPermaLink="false">http://justrakudoit.wordpress.com/?p=364#comment-2612</guid>
		<description><![CDATA[Given the problem, you can actually transform it into a semi-one liner.  I&#039;m too rusty at the moment to find the correct function for filtering the list down to the primes less than 20 from the infinite list, but the following works:
my @primes = (2,3,5,7,11,13,17,19);
[*] @primes.map({ $^prime ** log(20, $^prime).floor; });]]></description>
		<content:encoded><![CDATA[<p>Given the problem, you can actually transform it into a semi-one liner.  I&#8217;m too rusty at the moment to find the correct function for filtering the list down to the primes less than 20 from the infinite list, but the following works:<br />
my @primes = (2,3,5,7,11,13,17,19);<br />
[*] @primes.map({ $^prime ** log(20, $^prime).floor; });</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: colomon</title>
		<link>http://justrakudoit.wordpress.com/2011/06/23/euler-5/#comment-2611</link>
		<dc:creator><![CDATA[colomon]]></dc:creator>
		<pubDate>Thu, 23 Jun 2011 17:23:05 +0000</pubDate>
		<guid isPermaLink="false">http://justrakudoit.wordpress.com/?p=364#comment-2611</guid>
		<description><![CDATA[Indeed.  How soon we forget!

That really takes the wind out of the entire project, doesn&#039;t it?]]></description>
		<content:encoded><![CDATA[<p>Indeed.  How soon we forget!</p>
<p>That really takes the wind out of the entire project, doesn&#8217;t it?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sorear</title>
		<link>http://justrakudoit.wordpress.com/2011/06/23/euler-5/#comment-2610</link>
		<dc:creator><![CDATA[sorear]]></dc:creator>
		<pubDate>Thu, 23 Jun 2011 16:08:11 +0000</pubDate>
		<guid isPermaLink="false">http://justrakudoit.wordpress.com/?p=364#comment-2610</guid>
		<description><![CDATA[This is a Perl 6 predefined function (not in Niecza yet, but seems to work fine in Rakudo): &quot;say [lcm] 1..20&quot;]]></description>
		<content:encoded><![CDATA[<p>This is a Perl 6 predefined function (not in Niecza yet, but seems to work fine in Rakudo): &#8220;say [lcm] 1..20&#8243;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
