@coothead, Best wishes on your Birthday.
Notice I found another Pythagorean Date using this method:
PHP has a handy date() function that output a string date depending upon the second integer time. The time is the number of seconds since “Jan 1st 1970”:
https://www.php.net/manual/en/function.date
and format specifiers
https://www.php.net/manual/en/datetime.formats.time.php
<?php
define('SECONDS_PER_DAY', 60*60*24) ;
$now = 1607923804; // 3 days before last Pythagorean date
for($i2=0 ; $i2<39999; $i2++):
$y = (int) date('y', $now);
$m = (int) date('m', $now);
$d = (int) date('d', $now);
if( (($d * $d) + ($m * $m)) === $y * $y):
echo '<p><strong>';
echo date('D, M dS Y', $now);
// echo ' </strong> ==> ' .$d*$d .'+' .$m*$m.' === ' .$y*$y;
echo ' </strong> ==> ' .$m*$m .'+' .$d*$d.' === ' .$y*$y;
echo '</p>';
endif;
$now += SECONDS_PER_DAY;
endfor;
Output:
[quote]
Wed, Dec 16th 2020 ==> 144+256 === 400
Thu, Jul 24th 2025 ==> 49+576 === 625
Sat, Oct 24th 2026 ==> 100+576 === 676
Wed, Mar 04th 2105 ==> 9+16 === 25
Fri, Apr 03rd 2105 ==> 16+9 === 25
Sun, Jun 08th 2110 ==> 36+64 === 100
Wed, Aug 06th 2110 ==> 64+36 === 100
Fri, May 12th 2113 ==> 25+144 === 169
Tue, Dec 05th 2113 ==> 144+25 === 169
Thu, Sep 12th 2115 ==> 81+144 === 225
Mon, Dec 09th 2115 ==> 144+81 === 225
Sun, Aug 15th 2117 ==> 64+225 === 289
Mon, Dec 16th 2120 ==> 144+256 === 400
Tue, Jul 24th 2125 ==> 49+576 === 625
Thu, Oct 24th 2126 ==> 100+576 === 676[/quote]