<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Project Euler: Problem 28</title>
	<link>http://hotashi.com/jack/2008/11/10/project-euler-problem-28/</link>
	<description>Smart enough to know that I suck.</description>
	<pubDate>Wed, 08 Feb 2012 12:55:43 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.1</generator>
		<item>
		<title>By: David</title>
		<link>http://hotashi.com/jack/2008/11/10/project-euler-problem-28/#comment-10443</link>
		<dc:creator>David</dc:creator>
		<pubDate>Sun, 07 Aug 2011 06:28:32 +0000</pubDate>
		<guid>http://hotashi.com/jack/2008/11/10/project-euler-problem-28/#comment-10443</guid>
		<description>Here is the explaination provided by Colin Hughes on the forum for the problem.

Like many problems here they can be solved analytically, and this always adds another layer to the problem for the committed.

In my post above I showed that the sum of four corners for an nxn grid is given by 4n2-6n+6.

So we need to add that expression from n=3 to n=1001 in steps of 2.

The sum of the first k odd squares is k(4k2-1)/3.
The sum of the first k odd numbers is k2.

So we get S=4k(4k2-1)/3-6k2+6k.

Substituting in k=501 (1001 is the 501st odd), we get S=669171004, but this sum includes for when n=1. As the expression gives 4 for this, we need to subtract 4 and add 1 (the value at the centre), giving 66917003.</description>
		<content:encoded><![CDATA[<p>Here is the explaination provided by Colin Hughes on the forum for the problem.</p>
<p>Like many problems here they can be solved analytically, and this always adds another layer to the problem for the committed.</p>
<p>In my post above I showed that the sum of four corners for an nxn grid is given by 4n2-6n+6.</p>
<p>So we need to add that expression from n=3 to n=1001 in steps of 2.</p>
<p>The sum of the first k odd squares is k(4k2-1)/3.<br />
The sum of the first k odd numbers is k2.</p>
<p>So we get S=4k(4k2-1)/3-6k2+6k.</p>
<p>Substituting in k=501 (1001 is the 501st odd), we get S=669171004, but this sum includes for when n=1. As the expression gives 4 for this, we need to subtract 4 and add 1 (the value at the centre), giving 66917003.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kyle</title>
		<link>http://hotashi.com/jack/2008/11/10/project-euler-problem-28/#comment-10432</link>
		<dc:creator>Kyle</dc:creator>
		<pubDate>Thu, 26 May 2011 18:07:08 +0000</pubDate>
		<guid>http://hotashi.com/jack/2008/11/10/project-euler-problem-28/#comment-10432</guid>
		<description>How did you figure out those formulas?  Just by looking at it or is this a common pattern?</description>
		<content:encoded><![CDATA[<p>How did you figure out those formulas?  Just by looking at it or is this a common pattern?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kyle</title>
		<link>http://hotashi.com/jack/2008/11/10/project-euler-problem-28/#comment-10431</link>
		<dc:creator>Kyle</dc:creator>
		<pubDate>Thu, 26 May 2011 18:06:38 +0000</pubDate>
		<guid>http://hotashi.com/jack/2008/11/10/project-euler-problem-28/#comment-10431</guid>
		<description>How did you figure out those formulas?  Just by looking at it or is this a common thing?</description>
		<content:encoded><![CDATA[<p>How did you figure out those formulas?  Just by looking at it or is this a common thing?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vijay Dev</title>
		<link>http://hotashi.com/jack/2008/11/10/project-euler-problem-28/#comment-10360</link>
		<dc:creator>Vijay Dev</dc:creator>
		<pubDate>Sun, 11 Jan 2009 08:52:37 +0000</pubDate>
		<guid>http://hotashi.com/jack/2008/11/10/project-euler-problem-28/#comment-10360</guid>
		<description>Really Cool !</description>
		<content:encoded><![CDATA[<p>Really Cool !</p>
]]></content:encoded>
	</item>
</channel>
</rss>

