# Can be this prime numbers' property useful?

Today I've got a formula, which shows a way to write the result of multiplication between two generic integer $$a$$ and $$b$$.

$$a \cdot b=\sum_{i=0}^{\min[a,b]-1} k-2i$$ where $$k=a+b-1$$.
Showing it is true is easy.
That formula means that the result between the multiplication of two integer can be always written as the sum of certain consecutive all even or all odd integer (eg $$5 \cdot 8= 12+10+8+6+4; \ 7 \cdot 5=11+9+7+5+3$$). Moreover, since with multiplication you can get every interger exept for prime numbers, this leads to the fact that you can write in that way all the integer but not the prime. I was wondering if this property (I'd say non-property) of prime can be in some way usefull.

Your interesting observation states in another way a well known fact. Obviously, the sum of more than one consecutive even numbers will be even, and hence not prime. It is widely known the sum of the first $$n$$ odd numbers is $$n^2$$. Hence, the sum of any consecutive sequence of odd numbers (say from the $$(k+1)$$th to the $$n$$th odd number) will be $$n^2-k^2$$ which equals $$(n+k)(n-k)$$. In order for the sum to equal a prime $$p$$, we require $$p=(n+k)(n-k)$$. This only allows the solution $$p=n+k;\ 1=n-k$$. In other words, the "consecutive series" would contain only one member, $$p$$ itself. In your summation, this corresponds to summing from the inferior limit $$i=0$$ to the superior limit $$\min(p,1)-1=0$$. That is, a summation with only one term in it, that term being $$p+1-1-2(0)=p$$. So you reach the same result by a different route.