Given two natural numbers $m,n$, where $m$ is odd. Please prove that if $m\cdot2^n$ is a sum of two squares, then $m$ is a sum of two squares. Tested for all $m\cdot2^n<100,000$.
I love the natural numbers but feels number theory being inapproachable. So I'm experimenting and mostly (mis)use ME as a "proof calculator". While testing and using my BigZ I analyze sets and sequences of numbers like below.
1 1000 ~ :| n | n sqrsum ; intcond \ create all square sums in intervall
function odd-part transform-set \ transform to odd parts
zdup cardinality . 153
condition sqrsum filter-set \ only square sums filter
zdup cardinality . 153 \ conclude the conjecture in the question
condition noprime filter-set \ remove all primes from the set
condition nosqr filter-set \ remove all squares
set-of-factors \ create the set of all prime factor-tuples
cr zet. \ and print it:
{(5,197),(3,3,109),(5,193),(13,73),(5,5,37),(3,3,101),(5,181),(17,53),(3,3,97),(5,173),(5,13,13),(7,7,17),(3,3,89),(13,61),(5,157),(3,3,5,17),(5,149),(5,5,29),(17,41),(13,53),(5,137),(3,3,73),(7,7,13),(17,37),(5,11,11),(3,3,5,13),(5,113),(3,3,61),(5,109),(13,41),(5,101),(17,29),(5,97),(13,37),(3,3,53),(5,89),(5,5,17),(3,3,3,3,5),(13,29),(3,3,41),(5,73),(3,3,37),(5,5,13),(5,61),(5,53),(3,3,29),(5,7,7),(13,17),(5,41),(5,37),(3,3,17),(5,29),(5,5,5),(3,3,13),(5,17),(5,13),(3,3,5)} ok
From the remaining set the Sum of Two Squares Theorem is almost visible.
Also see my blog about using the most low level high level language Forth for mathematical calculations with sets and big integers.
$$ (a-b)^2 + (a+b)^2 = 2(a^2 + b^2) $$
If even $n$ is the sum of two squares, then both are odd or both even; taking $n = c^2 + d^2,$ $$ \frac{n}{2} = \left( \frac{c-d}{2} \right)^2 + \left( \frac{c+d}{2} \right)^2 $$
The rest is induction on the power of 2 dividing you number