Sum of the first $n$ numbers that is neither divisible by 2 nor 3.

474 Views Asked by At

Show that the sum of the first $n$ positive integers that are divisible by neither 2 nor 3 is $\frac{3}{2}n^2-\frac{1}{2}$ if $n$ is odd and is $\frac{3}{2}n^2$ if $n$ is even.

I have verified that the formulas work for the first 10 integers in the series, however, I do not know how to prove that it is true for all such positive integers. I have never dealt with a summation by cases before.

2

There are 2 best solutions below

2
On BEST ANSWER

HINT

Let $X_n$ be the sequence of positive integers that are not divisible by 2 or 3 ordered ascending.

Your base case for odd $n$ should be where $n$ is one. Ex -- $\frac{3}{2} * 1^2 - \frac{1}{2} = 1$.

Then you need to show that if this holds for $n$, then it holds for $n+2$.

Your base case for even $n$ should be the case where $n$ is two.

Then you need to show that if this holds for $n$, then it holds for $n+2$ as well.

0
On

Another idea: If you don't need to do this directly by induction, then you could try the following method.

If a number is not divisible by 2 or by 3, then it is of the form $6k + 1$ or of the form $6k + 5$ (which, of course, you should check). So let's focus on the case where $n$ is even, say $n = 2m$.

Then the first $2m$ numbers are exactly $$ 1, 5, 7, \ldots, 6m + 1, 6m + 5 $$ which we can split into two sums: $$ \sum_{k=0}^m (6k + 1) + \sum_{k=0}^m (6k + 5) $$ However, each of these can be evaluated by hand, just by knowing the identities $$ \sum_{k=0}^n k = \frac{n(n+1)}{2} $$ and $$ \sum_{k=0}^n 1 = n+1 $$ although you should check both of these. Moreover, the usual proof of the first is by induction anyhow...