Complex integer expression problem

  • Thread starter Werg22
  • Start date
  • #1
1,425
1
If n is a positive integer such as

[tex]2{\leq}n{\leq}80[/tex]

For how many values the expression [tex]\frac{(n+1)n(n-1)}{8}[/tex] takes positive and integer values?

I solved it that way...

[tex]\frac{(n+1)n(n-1)}{8}=\frac{(n^{2}-1)n}{8}[/tex]

(n^2 - 1)n must have 8 as one of its factor.

Either n is a multiple of 8, or n^2 - 1 is. Also the case were n^2 - 1 has 4 as one of its factors, n having 2, and vice-versa, is impossible - if n^2 - 1 is even, n is odd, and vice-versa.

So every mutliple of 8 up to 80 is a possible value. So there is 10 values.

Let's list those numbers

8, 16 , 24 , 32 , 40 , 48 , 56 , 64 , 72, 80

Add one to each one of these values

9, 17, 25, 33, 41, 49, 65 , 73, 81

There is 4 perfect square in this list. So if n^2 - 1 is a multiple of 8, then there is 4 possible values for n.

10 + 4 = 14

So 14 possibilities in total. But the true awnser is not what I found. What is wrong in my reasoning?
 

Answers and Replies

  • #2
0rthodontist
Science Advisor
1,230
0
There's no guarantee that n^2 - 1 lies between 9 and 81. It could be much larger.
 
  • #3
1,425
1
Right! Thanks. In that case any other way to solve this?
 
  • #4
0rthodontist
Science Advisor
1,230
0
Well since you are only looking up to 80 you can calculate them all directly, only takes a couple minutes to set things up. Also from observing that data it seems that every n yields an integer n(n+1)(n-1)/8 except for even integers that are not divisible by 8, so maybe you could break it down into parts. Every multiple of 8 yields an integer. And if x is a multiple of 2, and x is not itself divisible by 8, then x does not yield an integer because its adjacent integers are not even disible by 2. And every odd integer must yield an integer because its adjacent integers are both even, and one of the adjacent integers must also be divisible by 4.
 
Last edited:
  • #5
1,425
1
Ok. Since n^2 - 1 = (n-1)(n+1)

n - 1 must be a multiple of 8, or n+1 be a multiple of 8, or n - 1 be a multiple of 4, or n + 1 be a multiple of 4.

For exactly 10 values, n is multiple of 8

For exactly 10 values, n-1 is a multiple of 8.
For exactly 10 values, n+1 is a multiple of 8.

For exactly 20 values, n-1 is multiple of 4. Half of these being multiples of 8. So we count 10.
For exactly 20 values, n+1 is a multiple of 8. Half of these being multiples of 8. So we count 10.

So 10*5=50

The awnser is 50.
 
  • #6
AKG
Science Advisor
Homework Helper
2,565
4
I believe the answer is 49. You seem to be going about it in a very complicated way.

Case 1: n is odd
Then both n-1 and n+1 are even. Moreover, one of them (and in fact, only one of them) is a multiple of four. This is clear since if n is odd, then either n = 1 (mod 4) in which case n-1 = 0 (mod 4) and n+1 = 2 (mod 4), or n = 3 (mod 4) in which case n-1 = 2 (mod 4) and n+1 = 0 (mod 4). So since one of n-1 and n+1 is a multiple of four, and the other is even, the whole product (n-1)n(n+1) is a multiple of 8. So every odd n between 2 and 80 will do, and there are 39 such numbers.

Case 2: n is even
Then both n-1 and n+1 is odd, so if 8 | (n-1)n(n+1), then 8 | n, so the only even n's that work are multiples of 8. They are:

8, 16, 24, 32, 40, 48, 56, 64, 72, 80

That's 10, giving a total of:

49.

One problem with your solution is that n-1 is a multiple of 8 for only 9 values of n. Note that n-1 ranges from 1 to 79. n ranges from 2 to 80. n-1 will never be 80, so its missing one multiple of 8. That's where you're counting your extra one. Note also that there are only 19 values of n-1 which are a multiple of 4, 9 of which are multiples of 8, so when you subtract 9 from 19, you do still end up getting 10. Originally, you subtracted 10 from 20. You ended up with the right number, 10, but they way you got it was wrong.
 
  • #7
1,425
1
Okay, I see. Thanks.
 

Related Threads on Complex integer expression problem

  • Last Post
Replies
5
Views
3K
  • Last Post
Replies
6
Views
1K
  • Last Post
Replies
11
Views
1K
  • Last Post
Replies
3
Views
776
Replies
2
Views
2K
Replies
5
Views
2K
Replies
21
Views
553
  • Last Post
Replies
4
Views
2K
  • Last Post
Replies
2
Views
1K
Top