Section 14.3 Related Questions About Sums
There is yet another generalization that will serve better as a lead-in to the next chapters. Think about the following two problems.What numbers can be written as
(Think of it as? ). What numbers can be written as
?
Fact 14.3.1.
No number
can be written as
Proof.
Try all numbers modulo 8 and see what is possible! (See Exercise 14.4.3.)
xxxxxxxxxx
1
@interact
2
def _(n=10):
3
pretty_print(html("Using $a$ and $b$ up to $%s$:"%n))
4
L=[a^2+2*b^2 for a in [0..n] for b in [0..n]]
5
L.sort(); print(L)
Messages