{"id":943,"date":"2012-11-28T23:30:32","date_gmt":"2012-11-29T06:30:32","guid":{"rendered":"http:\/\/new-gro.dyn.hhhh.org\/joeboy\/blog\/?p=943"},"modified":"2014-07-22T16:17:55","modified_gmt":"2014-07-22T23:17:55","slug":"calculating-n2-as-a-series","status":"publish","type":"post","link":"https:\/\/www.hhhh.org\/joeboy\/blog\/?p=943","title":{"rendered":"Calculating N^2 as a series?"},"content":{"rendered":"<p>I am working on a problem from project Euler solving for Pythagorean triplets. I think it is supposed to be a simple coding problem solved brute force with two for loops. Something about the problem has my gut telling to try to solve the problem a little more elegantly. \u00a0To that end I was looking at trying to calculate N^2 as a series so I could break up the triplets into over common and different components to manipulate.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-944\" title=\"n_squared_w_addition\" src=\"https:\/\/www.hhhh.org\/joeboy\/blog\/wp-content\/uploads\/2012\/12\/n_squared_w_addition.jpg\" alt=\"\" width=\"1441\" height=\"1303\" \/><\/p>\n<p>This is the first thing that jumped out at me \u2013 obvious pattern when I thought about N^2 having 2N as the first derivative and 2 as the second \u2013 but I did not see it right away. Might be useful.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I am working on a problem from project Euler solving for Pythagorean triplets. I think it is supposed to be a simple coding problem solved brute force with two for loops. Something about the problem has my gut telling to try to solve the problem a little more elegantly. \u00a0To that end I was looking [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,57],"tags":[],"class_list":["post-943","post","type-post","status-publish","format-standard","hentry","category-problems","category-project-euler"],"_links":{"self":[{"href":"https:\/\/www.hhhh.org\/joeboy\/blog\/index.php?rest_route=\/wp\/v2\/posts\/943","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hhhh.org\/joeboy\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hhhh.org\/joeboy\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hhhh.org\/joeboy\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hhhh.org\/joeboy\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=943"}],"version-history":[{"count":6,"href":"https:\/\/www.hhhh.org\/joeboy\/blog\/index.php?rest_route=\/wp\/v2\/posts\/943\/revisions"}],"predecessor-version":[{"id":1156,"href":"https:\/\/www.hhhh.org\/joeboy\/blog\/index.php?rest_route=\/wp\/v2\/posts\/943\/revisions\/1156"}],"wp:attachment":[{"href":"https:\/\/www.hhhh.org\/joeboy\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=943"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hhhh.org\/joeboy\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=943"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hhhh.org\/joeboy\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=943"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}