<?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/"
		>
<channel>
	<title>Comments on: Euler Problem 66</title>
	<atom:link href="http://www.dailydoseofexcel.com/archives/2009/03/08/euler-problem-66/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dailydoseofexcel.com/archives/2009/03/08/euler-problem-66/</link>
	<description>Daily posts of Excel tips…and other stuff</description>
	<lastBuildDate>Thu, 09 Feb 2012 18:06:07 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Michael</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/03/08/euler-problem-66/#comment-42629</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Mon, 07 Dec 2009 15:52:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=2204#comment-42629</guid>
		<description>&lt;p&gt;Hello Fernando -&lt;/p&gt;
&lt;p&gt;You&#039;re welcome.  Glad to help out.  I&#039;ve ripped C# off enough.  Nice to know it goes the other way.&lt;/p&gt;
&lt;p&gt;I&#039;m at about 140 or so.  I&#039;ve slowed down as real life intruded into my hobby.  You&#039;ll find the ones that interested me, or taught me something, here.&lt;/p&gt;
&lt;p&gt;&lt;i&gt;...mrt&lt;/i&gt;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hello Fernando -</p>
<p>You&#8217;re welcome.  Glad to help out.  I&#8217;ve ripped C# off enough.  Nice to know it goes the other way.</p>
<p>I&#8217;m at about 140 or so.  I&#8217;ve slowed down as real life intruded into my hobby.  You&#8217;ll find the ones that interested me, or taught me something, here.</p>
<p><i>&#8230;mrt</i></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fernando</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/03/08/euler-problem-66/#comment-42615</link>
		<dc:creator>Fernando</dc:creator>
		<pubDate>Sun, 06 Dec 2009 19:22:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=2204#comment-42615</guid>
		<description>&lt;p&gt;Hi there!&lt;/p&gt;
&lt;p&gt;Thanks for the algorithm it helped me quite a lot.&lt;br&gt;
I translated it into C# and it worked straight away.&lt;/p&gt;
&lt;p&gt;If anyone out there is still going through these problems let me know. It will be nice to exchange ideas. I have done about 90 so far so I still have a long way to go.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi there!</p>
<p>Thanks for the algorithm it helped me quite a lot.<br />
I translated it into C# and it worked straight away.</p>
<p>If anyone out there is still going through these problems let me know. It will be nice to exchange ideas. I have done about 90 so far so I still have a long way to go.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/03/08/euler-problem-66/#comment-38500</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Sun, 15 Mar 2009 19:36:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=2204#comment-38500</guid>
		<description>&lt;p&gt;Hi David -&lt;/p&gt;
&lt;p&gt;I played around with it, using Doug&#039;s insights in the first comment, and while they were a different three lines, there were still three.&lt;/p&gt;
&lt;p&gt;Don&#039;t take that as the conclusive answer.  Certainly PellSoln can be re-written to do the looping there, but you&#039;d want to pass it limits as arguments.  Problem 64 goes to 10,000.  I&#039;ve discovered that in these tough economic times, 100 just isn&#039;t generous anymore.  ;-) For Problem, you&#039;d need to raise the five arrays to (0 to 500), and in order change the returns to PellSoln = Array(x1,y1,n) ; = Array(x1,y1,r +1) ;  = Array(x_nth,y_nth, r +1).  Then test PellSoln(D)(3) for oddness. R+1 is the n at which the periodicity starts.&lt;/p&gt;
&lt;p&gt;...mrt&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi David -</p>
<p>I played around with it, using Doug&#8217;s insights in the first comment, and while they were a different three lines, there were still three.</p>
<p>Don&#8217;t take that as the conclusive answer.  Certainly PellSoln can be re-written to do the looping there, but you&#8217;d want to pass it limits as arguments.  Problem 64 goes to 10,000.  I&#8217;ve discovered that in these tough economic times, 100 just isn&#8217;t generous anymore.  <img src='http://www.dailydoseofexcel.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  For Problem, you&#8217;d need to raise the five arrays to (0 to 500), and in order change the returns to PellSoln = Array(x1,y1,n) ; = Array(x1,y1,r +1) ;  = Array(x_nth,y_nth, r +1).  Then test PellSoln(D)(3) for oddness. R+1 is the n at which the periodicity starts.</p>
<p>&#8230;mrt</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/03/08/euler-problem-66/#comment-38432</link>
		<dc:creator>David</dc:creator>
		<pubDate>Thu, 12 Mar 2009 23:50:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=2204#comment-38432</guid>
		<description>&lt;p&gt;It is of some interest to write out all of the results and it turns out to be at least as fast to do so. The conditional formatting feature of Excel highlights the maximum value of x (1.64E+37).&lt;/p&gt;
&lt;p&gt;Sub Problem_066()&lt;/p&gt;
&lt;p&gt;   Dim D As Long&lt;br&gt;
   Dim T As Single&lt;br&gt;
   Dim SolnArray As Variant&lt;br&gt;
   Dim tempArray As Variant&lt;/p&gt;
&lt;p&gt;   ReDim SolnArray(1 To 1000, 1 To 3)&lt;br&gt;
   ReDim tempArray(1 To 2)&lt;/p&gt;
&lt;p&gt;   T = Timer&lt;br&gt;
   For D = 1 To 1000&lt;br&gt;
    SolnArray(D, 1) = D&lt;br&gt;
    tempArray = PellSoln(D)&lt;br&gt;
    SolnArray(D, 2) = tempArray(1)&lt;br&gt;
    SolnArray(D, 3) = tempArray(2)&lt;br&gt;
   Next D&lt;/p&gt;
&lt;p&gt;   Sheets(1).Range(&quot;A1:C1000?).Value = SolArray&lt;/p&gt;
&lt;p&gt;   Debug.Print &quot;  Time:&quot;; Timer - T&lt;br&gt;
End Sub&lt;/p&gt;
&lt;p&gt;It ran for me in anywhere from 0.012 to 0.03 secs&lt;/p&gt;
&lt;p&gt;I have always wanted to know if these three lines can be reduced to one:&lt;/p&gt;
&lt;p&gt;tempArray = PellSoln(D)&lt;br&gt;
SolnArray(D, 2) = tempArray(1)&lt;br&gt;
SolnArray(D, 3) = tempArray(2)&lt;/p&gt;
&lt;p&gt;If they cannot, is there a way to write the array return from PellSoln to a single row of a 1000 x 2 array in one step?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>It is of some interest to write out all of the results and it turns out to be at least as fast to do so. The conditional formatting feature of Excel highlights the maximum value of x (1.64E+37).</p>
<p>Sub Problem_066()</p>
<p>   Dim D As Long<br />
   Dim T As Single<br />
   Dim SolnArray As Variant<br />
   Dim tempArray As Variant</p>
<p>   ReDim SolnArray(1 To 1000, 1 To 3)<br />
   ReDim tempArray(1 To 2)</p>
<p>   T = Timer<br />
   For D = 1 To 1000<br />
    SolnArray(D, 1) = D<br />
    tempArray = PellSoln(D)<br />
    SolnArray(D, 2) = tempArray(1)<br />
    SolnArray(D, 3) = tempArray(2)<br />
   Next D</p>
<p>   Sheets(1).Range(&#8220;A1:C1000?).Value = SolArray</p>
<p>   Debug.Print &#8221;  Time:&#8221;; Timer &#8211; T<br />
End Sub</p>
<p>It ran for me in anywhere from 0.012 to 0.03 secs</p>
<p>I have always wanted to know if these three lines can be reduced to one:</p>
<p>tempArray = PellSoln(D)<br />
SolnArray(D, 2) = tempArray(1)<br />
SolnArray(D, 3) = tempArray(2)</p>
<p>If they cannot, is there a way to write the array return from PellSoln to a single row of a 1000 x 2 array in one step?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/03/08/euler-problem-66/#comment-38401</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Tue, 10 Mar 2009 14:04:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=2204#comment-38401</guid>
		<description>&lt;p&gt;Hi Doug -&lt;/p&gt;
&lt;p&gt;Thank you.  No, no great problem, just a sense that that wasn&#039;t how the pro&#039;s do it. ;-)  And that sense turned out to be right.&lt;/p&gt;
&lt;p&gt;Your &quot;Actually...&quot; clears up something I&#039;d never understood, being of too literal a mindset.&lt;/p&gt;
&lt;p&gt;And contrary to what I thought, I&#039;ll probably have use for Pell again in #64.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;...mrt&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi Doug -</p>
<p>Thank you.  No, no great problem, just a sense that that wasn&#8217;t how the pro&#8217;s do it. <img src='http://www.dailydoseofexcel.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />   And that sense turned out to be right.</p>
<p>Your &#8220;Actually&#8230;&#8221; clears up something I&#8217;d never understood, being of too literal a mindset.</p>
<p>And contrary to what I thought, I&#8217;ll probably have use for Pell again in #64.</p>
<p>Thanks.</p>
<p>&#8230;mrt</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Doug Jenkins</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/03/08/euler-problem-66/#comment-38395</link>
		<dc:creator>Doug Jenkins</dc:creator>
		<pubDate>Mon, 09 Mar 2009 22:38:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=2204#comment-38395</guid>
		<description>&lt;p&gt;&quot;Is there a better way to return a 1×2 array?&quot;&lt;/p&gt;
&lt;p&gt;Is there a problem with the way you did it?&lt;/p&gt;
&lt;p&gt;Actually it creates a 1D array with 2 elements, rather than a 2D array with 1 row and 2 columns.&lt;/p&gt;
&lt;p&gt;If I want to return an array from a function I usually decalare and dimension (base 1) an array variable, then assign it to the function:&lt;/p&gt;
&lt;p&gt;Function PassArray() as variant&lt;br&gt;
Dim VBAArray(1 to 1, 1 to 2) as double&lt;br&gt;
VBAArray(1,1) = 123&lt;br&gt;
VBAArray(1,2) = 456&lt;br&gt;
PassArray = VBAArray&lt;br&gt;
End Function&lt;/p&gt;
&lt;p&gt;It has the advantage that it has the same structure as the array that ends up in the spreadsheet, but I don&#039;t know that it&#039;s really any better than using Array().&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>&#8220;Is there a better way to return a 1×2 array?&#8221;</p>
<p>Is there a problem with the way you did it?</p>
<p>Actually it creates a 1D array with 2 elements, rather than a 2D array with 1 row and 2 columns.</p>
<p>If I want to return an array from a function I usually decalare and dimension (base 1) an array variable, then assign it to the function:</p>
<p>Function PassArray() as variant<br />
Dim VBAArray(1 to 1, 1 to 2) as double<br />
VBAArray(1,1) = 123<br />
VBAArray(1,2) = 456<br />
PassArray = VBAArray<br />
End Function</p>
<p>It has the advantage that it has the same structure as the array that ends up in the spreadsheet, but I don&#8217;t know that it&#8217;s really any better than using Array().</p>
]]></content:encoded>
	</item>
</channel>
</rss>

