Question 517510
I presume by your definition that "x is a type 1 integer if x = 3y + 1 for integer y" and similarly for b. There are two ways to show this (the second solution is much easier and more elegant).


Solution 1: Simply expand the expression a^2 - b, e.g.


*[tex \LARGE (3m+1)^2 - (3n+2)]


*[tex \LARGE = 9m^2 + 6m + 1 - 3n - 2]


*[tex \LARGE = 3(3m^2 + 2m - n) - 1]


We can write it in the form of a "type two" integer by adding 3 then subtracting 3:


*[tex \LARGE = 3(3m^2 + 2m - n) - 3 + 3 - 1]


The -3 can be factored along with 3(3m^2 + 2m - n):


*[tex \LARGE = 3(m^2 + 2m - n - 1) + 3 - 1 = 3(m^2 + 2m - n - 1) + 2], hence it is a type 2 integer. ∎
--------------------
Solution 2: This involves modular arithmetic (http://en.wikipedia.org/wiki/Modular_arithmetic). It is clear that all integers congruent to 1 mod 3 are type 1 integers, and all integers congruent to 2 mod 3 are type 2 integers. Also,


*[tex \LARGE a \equiv 1 (mod 3), b \equiv 2 (mod 3)] so it follows that


*[tex \LARGE a^2 - b \equiv 1^2 - 2 \equiv -1 \equiv 2 (mod 3)]


Therefore a^2 - b is a type 2 integer. ∎