Prove n^2+2^n Composite if n not 6k+3

In summary, if ## n>1 ## is an integer not of the form ## 6k+3 ##, then ## n^{2}+2^{n} ## is composite.
  • #1
Math100
756
201
Homework Statement
If ## n>1 ## is an integer not of the form ## 6k+3 ##, prove that ## n^{2}+2^{n} ## is composite.
[Hint: Show that either ## 2 ## or ## 3 ## divides ## n^{2}+2^{n} ##.
Relevant Equations
None.
Proof:

Suppose ## n>1 ## is an integer not of the form ## 6k+3 ##.
Then we have ## n=6k ## for some ## k\in\mathbb{Z} ##.
Thus ## n^{2}+2^{n}=(6k)^{2}+2^{6k} ##
## =36k^{2}+2^{6k} ##
## =2(18k^{2}+2^{6k-1}) ##
## =2m ##,
where ## m=18k^{2}+2^{6k-1} ## is an integer.
This means ## 2\mid n^{2}+2^{n} ##,
which implies that ## n^{2}+2^{n} ## is composite.
Therefore, if ## n>1 ## is an integer not of the form ## 6k+3 ##,
then ## n^{2}+2^{n} ## is composite.
 
  • Skeptical
Likes PeroK
Physics news on Phys.org
  • #2
Math100 said:
Homework Statement:: If ## n>1 ## is an integer not of the form ## 6k+3 ##, prove that ## n^{2}+2^{n} ## is composite.
[Hint: Show that either ## 2 ## or ## 3 ## divides ## n^{2}+2^{n} ##.
Relevant Equations:: None.

Proof:

Suppose ## n>1 ## is an integer not of the form ## 6k+3 ##.
Then we have ## n=6k ## for some ## k\in\mathbb{Z} ##.
No, we don't. We have ##n=6k## or ##n=6k+1## or ##n=6k+2## or ##n=6k+4## or ##n=6k+5.##
Examples: ##36\, , \,37\, , \,38\, , \,40\, , \,41## and only ##36## is of the form ##6k.##

Use the hint!

If ##n## is even, then ##4\,|\,(n^2+2^n)## since ##n## is at least ##2.## And ##n^2+2^n> 4,## hence it is composite. (Derive what I just said.)

If ##n## is odd, then ...

Math100 said:
Thus ## n^{2}+2^{n}=(6k)^{2}+2^{6k} ##
## =36k^{2}+2^{6k} ##
## =2(18k^{2}+2^{6k-1}) ##
## =2m ##,
where ## m=18k^{2}+2^{6k-1} ## is an integer.
This means ## 2\mid n^{2}+2^{n} ##,
which implies that ## n^{2}+2^{n} ## is composite.
Therefore, if ## n>1 ## is an integer not of the form ## 6k+3 ##,
then ## n^{2}+2^{n} ## is composite.
 
  • Like
Likes Math100
  • #3
For ## n=6k, n=6k+2 ## or ## n=6k+4 ##, I know that ## 2\mid n^2+2^{n} ##. But for ## n=6k+1 ## or ## n=6k+5 ##, how should I show/prove that ## 3\mid n^2+2^{n} ##? Because for ## n=6k+1 ## or ## n=6k+5 ##, this is what I got so far:

Suppose ## n=6k+1 ## for some ## k\in\mathbb{Z} ##.
Then we have ## n^{2}+2^{n}=(6k+1)^{2}+2^{6k+1} ##
## =36k^2+12k+2^{6k+1}+1 ##

But I don't see the pattern of factor of 3, how should I factor out the 3 from here? Similarly, this is what I got for ## n=6k+5 ##:

Suppose ## n=6k+5 ## for some ## k\in\mathbb{Z} ##.
Then we have ## n^{2}+2^{n}=(6k+5)^{2}+2^{6k+5} ##
## =36k^2+60k+2^{6k+5}+25 ##
Again, I don't see the pattern of factor of 3 either.
 
  • #4
If ##n## is odd, then you have the two cases you began with. Since we are interested in the factor ##3,## it is natural to consider your equations modulo ##3,## i.e. divide by ##3## and concentrate on the remainders. E.g. ##36k^2+60k+2^{6k+5}+25 \equiv 0\cdot k^2+0\cdot k + 32 \cdot 2^{6k}+1\equiv2\cdot 2^{6k}+1 \mod 3.## Are those numbers divisible by ##3,## and why or why not?
 
  • Like
Likes Math100
  • #5
fresh_42 said:
If ##n## is odd, then you have the two cases you began with. Since we are interested in the factor ##3,## it is natural to consider your equations modulo ##3,## i.e. divide by ##3## and concentrate on the remainders. E.g. ##36k^2+60k+2^{6k+5}+25 \equiv 0\cdot k^2+0\cdot k + 32 \cdot 2^{6k}+1\equiv2\cdot 2^{6k}+1 \mod 3.## Are those numbers divisible by ##3,## and why or why not?
Yes, because obviously, ## 36 ## and ## 60 ## in front of ## k^2 ## and ## k ## are divisible by ##3## also ##2^{6k+5}=2\cdot 2^{6k}##, and ## 2\cdot 2^{6k}=2^{6k+1} ##.

So this means ## 3\mid 2^{6k+1}+1 ##.
 
Last edited by a moderator:
  • #6
Why is it divisible by ##3##? Odd alone only gives us odd +1 = even which might or might not be divisible by ##3##. What is your argument?
 
  • Like
Likes Math100
  • #7
The only place where we used ##n\neq 6k+3## was as we did not consider this case. Do you have an idea why your proof wouldn't work if ##n=6k+3##? And what about your other equation?
 
  • Like
Likes Math100
  • #8
Because ## 2\cdot 2^{6k}\equiv 2 ## mod ## 3 ##.
 
  • #9
fresh_42 said:
The only place where we used ##n\neq 6k+3## was as we did not consider this case. Do you have an idea why your proof wouldn't work if ##n=6k+3##? And what about your other equation?
Because for ##n=6k+3##:
we have ## n^2+2^{n}=36k^2+36k+2^{6k+3}+9\equiv 2 ## mod ## 3 ##.
 
  • #10
Math100 said:
Because ## 2\cdot 2^{6k}\equiv 2 ## mod ## 3 ##.
So? We have ##2^{6k+5}\equiv 32\cdot 2^{6k}\equiv 2\cdot 2^{6k}\equiv 2^{6k+1}\equiv 2 \mod 3## and ##2^{6k+3}\equiv 8\cdot 2^{6k}\equiv 2 \mod 3## too. Where is the difference?
 
  • #11
fresh_42 said:
So? We have ##2^{6k+5}\equiv 32\cdot 2^{6k}\equiv 2\cdot 2^{6k}\equiv 2^{6k+1}\equiv 2 \mod 3## and ##2^{6k+3}\equiv 8\cdot 2^{6k}\equiv 2 \mod 3## too. Where is the difference?
Are you talking about the difference between ## n=6k+1 ## or ## n=6k+5 ## and ## n=6k+3 ##?
 
  • #12
Yes. We did not really use the condition ##n\neq 6k+3## except that we omitted the case. But ##2^\text{odd}=2^{2m+1}=2\cdot 4^m \equiv 2\cdot 1^m\equiv 2\mod 3## is the same in all cases. Why do we need the condition ##n\neq 6k+3## at all?
 
  • #13
For ## n=6k+5 ##,
we have ## 36k^2+60k+2^{6k+5}+25\equiv 0\cdot k^2+0\cdot k+32\cdot 2^{6k}+1\equiv 2\cdot 2^{6k}+1\equiv 0 ## mod ## 3 ##.
Thus, ## 3\mid n^{2}+2^{n} ##.
 
  • #14
Math100 said:
For ## n=6k+5 ##,
we have ## 36k^2+60k+2^{6k+5}+25\equiv 0\cdot k^2+0\cdot k+32\cdot 2^{6k}+1\equiv 2\cdot 2^{6k}+1\equiv 0 ## mod ## 3 ##.
Thus, ## 3\mid n^{2}+2^{n} ##.
Yes, and the other equation for ##n=6k+1## is analogous.
 
  • Like
Likes Math100
  • #15
fresh_42 said:
Yes. We did not really use the condition ##n\neq 6k+3## except that we omitted the case. But ##2^\text{odd}=2^{2m+1}=2\cdot 4^m \equiv 2\cdot 1^m\equiv 2\mod 3## is the same in all cases. Why do we need the condition ##n\neq 6k+3## at all?
Is it because ## 2^{6k+3}=2^{3(2k+1)} ##?
 
  • #16
Math100 said:
Is it because ## 2^{6k+3}=2^{3(2k+1)} ##?
No. The proof fails at another point. But where and why?
 
  • #17
fresh_42 said:
No. The proof fails at another point. But where and why?
For ## n=6k+3 ##:
we have ## 36k^2+36k+2^{6k+3}+9\equiv 0\cdot k^2+0\cdot k+8\cdot 2^{6k}+0\equiv 8\cdot 2^{6k}\equiv 1 ## mod ## 3 ##.
 
  • #18
When ## n=6k+3 ##,
## n^2+2^{n} ## is prime.
 
  • #19
Math100 said:
For ## n=6k+3 ##:
we have ## 36k^2+36k+2^{6k+3}+9\equiv 0\cdot k^2+0\cdot k+8\cdot 2^{6k}+0\equiv 8\cdot 2^{6k}\equiv 1 ## mod ## 3 ##.
Almost. All correct. but it is ##\equiv 2 \mod 3##. But it isn't divisible by ##3##. Would be interesting to find some primes ##n^2+2^n## with ##n=6k+3##, ##k>0##.
 
  • Like
Likes Math100
  • #20
fresh_42 said:
Almost. All correct. but it is ##\equiv 2 \mod 3##. But it isn't divisible by ##3##. Would be interesting to find some primes ##n^2+2^n## with ##n=6k+3##, ##k>0##.
For ## k=1 ##, the result of ## n^2+2^n ## is prime, since it gives us ## 593 ##.
 
  • Like
Likes fresh_42
  • #22
Okay, so here's my revised proof:

Suppose ## n>1 ## is an integer not of the form ## 6k+3 ##.
Applying the Division Algorithm produces:
## n=6k ##, ## n=6k+1 ##, ## n=6k+2 ##, ## n=6k+4 ##, or ## n=6k+5 ##.
Now we consider five cases.
Case #1: Suppose ## n=6k ## for some ## k\in\mathbb{Z} ##.
Then we have ## n^2+2^{n}=(6k)^2+2^{6k} ##
## =36k^2+2^{6k} ##
## =2(18k^2+2^{6k-1}) ##
## =2m ##,
where ## m=18k^2+2^{6k-1} ## is an integer.
Thus, ## 2\mid n^2+2^{n} ##.
Case #2: Suppose ## n=6k+1 ## for some ## k\in\mathbb{Z} ##.
Then we have ## n^2+2^{n}=(6k+1)^2+2^{6k+1} ##
## =36k^2+12k+2^{6k+1}+1 ##
## \equiv 0\cdot k^2+0\cdot k+2\cdot 2^{6k}+1 ##
## \equiv 2\cdot 2^{6k}+1 ##
## \equiv 0 ## mod ## 3 ##.
Thus, ## 3\mid n^2+2^{n} ##.
Case #3: Suppose ## n=6k+2 ## for some ## k\in\mathbb{Z} ##.
Then we have ## n^2+2^{n}=(6k+2)^2+2^{6k+2} ##
## =36k^2+24k+2^{6k+2}+4 ##
## =2(18k^2+12k+2^{6k+1}+2) ##
## =2m ##,
where ## m=18k^2+12k+2^{6k+1}+2 ## is an integer.
Thus, ## 2\mid n^2+2^{n} ##.
Case #4: Suppose ## n=6k+4 ## for some ## k\in\mathbb{Z} ##.
Then we have ## n^2+2^{n}=(6k+4)^2+2^{6k+4} ##
## =36k^2+48k+2^{6k+4}+16 ##
## =2(18k^2+24k+2^{6k+3}+8) ##
## =2m ##,
where ## m=18k^2+24k+2^{6k+3}+8 ## is an integer.
Thus, ## 2\mid n^2+2^{n} ##.
Case #5: Suppose ## n=6k+5 ## for some ## k\in\mathbb{Z} ##.
Then we have ## n^2+2^{n}=(6k+5)^2+2^{6k+5} ##
## =36k^2+60k+2^{6k+5}+25 ##
## \equiv 0\cdot k^2+0\cdot k+32\cdot 2^{6k}+1 ##
## \equiv 2\cdot 2^{6k}+1 ##
## \equiv 0 ## mod ## 3 ##.
Thus, ## 3\mid n^2+2^{n} ##.
Therefore, if ## n>1 ## is an integer not of the form ## 6k+3 ##, then ## n^2+2^{n} ## is composite.
 
  • #23
I think you should handle all cases where ##n## is even in one step. And you should mention somewhere that ##n^2+2^n>3##. Otherwise, we only have ##2\,|\,n^2+2^n## or ##3\,|\,n^2+2^n## and ##n^2+2^n\in \{2,3\}## would be possible, and those are not composite numbers.
 
  • #24
fresh_42 said:
I think you should handle all cases where ##n## is even in one step. And you should mention somewhere that ##n^2+2^n>3##. Otherwise, we only have ##2\,|\,n^2+2^n## or ##3\,|\,n^2+2^n## and ##n^2+2^n\in \{2,3\}## would be possible, and those are not composite numbers.
How should I do this?
 
  • #25
Between what lines (where) should I mention that ## n^2+2^{n}>3 ##?
 
  • #26
Math100 said:
Between what lines (where) should I mention that ## n^2+2^{n}>3 ##?
You could start with it. E.g.: ##n>1## means ##n^2+2^n>7## so it is sufficient to show that either ##2\,|\,n^2+2^n## or ##3\,|\,n^2+2^n##.

If ##n## is even, then ...

If ##n## is odd, then we are left with the cases ##n\equiv c\mod 6## with ##c\in \{1,5\}.## Thus ##n^2+2^n=36k^2 + 12\cdot c\cdot k +c^2 +2^{6k+c}= 36k^2 + 12\cdot c\cdot k +c^2 + 2^c\cdot 64^k\equiv 1 + 2^c \equiv 0 \mod 3.##

__________

In case this structure would still convince you if you read it, then it is the briefness you should generally aspire to achieve.
 
  • Like
Likes Math100
  • #27
fresh_42 said:
You could start with it. E.g.: ##n>1## means ##n^2+2^n>7## so it is sufficient to show that either ##2\,|\,n^2+2^n## or ##3\,|\,n^2+2^n##.

If ##n## is even, then ...

If ##n## is odd, then we are left with the cases ##n\equiv c\mod 6## with ##c\in \{1,5\}.## Thus ##n^2+2^n=36k^2 + 12\cdot c\cdot k +c^2 +2^{6k+c}= 36k^2 + 12\cdot c\cdot k +c^2 + 2^c\cdot 64^k\equiv 1 + 2^c \equiv 0 \mod 3.##

__________

In case this structure would still convince you if you read it, then it is the briefness you should generally aspire to achieve.
Using this method, do I still have to include/mention the Division Algorithm or not?
 
  • #28
Math100 said:
Using this method, do I still have to include/mention the Division Algorithm or not?
The rule should be: Write it in a briefness such that you can still understand it in a month from now. So I'd say yes. Leave hints like "division algorithm", or a note that ##c^2\in \{1,25\}=\{1\} \mod 3##, or that ##64^k\equiv 1^k \equiv 1 \mod 3.##

You must be able to create notes that you still understand later on without relearning the entire finding process again.
 
  • #29
fresh_42 said:
You could start with it. E.g.: ##n>1## means ##n^2+2^n>7## so it is sufficient to show that either ##2\,|\,n^2+2^n## or ##3\,|\,n^2+2^n##.

If ##n## is even, then ...

If ##n## is odd, then we are left with the cases ##n\equiv c\mod 6## with ##c\in \{1,5\}.## Thus ##n^2+2^n=36k^2 + 12\cdot c\cdot k +c^2 +2^{6k+c}= 36k^2 + 12\cdot c\cdot k +c^2 + 2^c\cdot 64^k\equiv 1 + 2^c \equiv 0 \mod 3.##

__________

In case this structure would still convince you if you read it, then it is the briefness you should generally aspire to achieve.
If ## n ## is even,
then ## n\equiv c ## mod ## 6 ## for ##c\in \{0,2,4\}.##
Thus ## n^2+2^{n}=36k^2+12\cdot c\cdot k +c^2 +2^{6k+c} ##
## =36k^2+12\cdot c\cdot k +c^2 +2^c\cdot 64^k ##
## \equiv 2^c ##
## \equiv 0\mod 2 ##.
 
  • #30
Suppose ## n>1 ## is an integer not of the form ## 6k+3 ##.
Note that ## n^2+2^{n}>7 ## for ## n>1 ##.
This means ## 2\mid n^2+2^{n} ## or ## 3\mid n^2+2^{n} ##.
Applying the Division Algorithm produces:
## n=6k, n=6k+1, n=6k+2, n=6k+4, ## or ## 6k+5 ##.
Now we consider two cases.
Case #1: Suppose ## n ## is an odd integer.
Then we have ## n\equiv c ## mod ## 6 ## for ##c\in \{1,5\}##.
Thus ## n^2+2^{n}=36k^2+12\cdot c\cdot k +c^2+2^{6k+c} ##
## =36k^2+12\cdot c\cdot k +c^2+2^{c}\cdot 64^{k} ##
## \equiv 1+2^{c} ##
## \equiv 0 ## mod ## 3 ##,
which implies that ## 3\mid n^2+2^{n} ##.
Case #2: Suppose ## n ## is an even integer.
Then we have ## n\equiv c ## mod ## 6 ## for ##c\in \{0,2,4\}##.
Thus ## n^2+2^{n}=36k^2+12\cdot c\cdot k +c^2+2^{6k+c} ##
## =36k^2+12\cdot c\cdot k +c^2+2^{c}\cdot 64^{k} ##
## \equiv 2^{c} ##
## \equiv 0 ## mod ## 2 ##,
which implies that ## 2\mid n^2+2^{n} ##.
Therefore, if ## n>1 ## is an integer not of the form ## 6k+3 ##, then ## n^2+2^{n} ## is composite.
 
  • Like
Likes fresh_42
  • #31
You can write the even case without a ##c##. If ##n## is even, then ##n=2k\, , \,k>0## and ##n^2+2^n=4k^2+4^k\equiv 0 \mod 2## which is a bit shorter.

There are often situations in mathematics where symmetric cases (like odd/even) are not treated by the same methods. One case could be easy, the other one difficult, or require more sub-cases like ##c=1,5## in our case.
 
  • Like
Likes Math100

1. How do you prove that n^2+2^n is composite if n is not a multiple of 6 plus 3?

To prove this statement, we can use proof by contradiction. Assume that n^2+2^n is prime for some value of n that is not a multiple of 6 plus 3. This means that n^2+2^n cannot be factored into smaller integers. However, we can rewrite n^2+2^n as (n+1)(n^2-2^n+1). Since n is not a multiple of 6 plus 3, n+1 and n^2-2^n+1 will both be even. Therefore, n^2+2^n can be factored into smaller integers, contradicting our initial assumption. Thus, n^2+2^n must be composite if n is not 6k+3.

2. Can you provide an example to illustrate this proof?

Sure, let's take n=4. This value is not a multiple of 6 plus 3. Plugging n=4 into the expression n^2+2^n, we get 4^2+2^4=16+16=32. Since 32 can be factored into 4 and 8, n^2+2^n is composite for n=4. This example supports our proof by contradiction.

3. What is the significance of n being a multiple of 6 plus 3?

The significance of this condition is that it ensures that both n+1 and n^2-2^n+1 are even, which allows us to factor n^2+2^n into smaller integers. Without this condition, we cannot guarantee that n^2+2^n will be composite.

4. Can this proof be extended to other values of n?

Yes, this proof can be extended to any value of n that is not a multiple of 6 plus 3. The key idea is that if n is not a multiple of 6 plus 3, then both n+1 and n^2-2^n+1 will be even, allowing us to factor n^2+2^n into smaller integers.

5. Are there any other conditions that would make n^2+2^n composite?

Yes, there are other conditions that can make n^2+2^n composite. For example, if n is a multiple of 3, then n^2+2^n will be divisible by 3 and therefore composite. Similarly, if n is a multiple of 5, then n^2+2^n will be divisible by 5 and composite. However, the condition of n being a multiple of 6 plus 3 is the most general condition that guarantees the composite nature of n^2+2^n.

Similar threads

  • Calculus and Beyond Homework Help
Replies
3
Views
742
  • Calculus and Beyond Homework Help
Replies
3
Views
1K
  • Calculus and Beyond Homework Help
Replies
7
Views
2K
  • Calculus and Beyond Homework Help
Replies
5
Views
843
  • Calculus and Beyond Homework Help
Replies
4
Views
812
  • Calculus and Beyond Homework Help
Replies
16
Views
2K
  • Calculus and Beyond Homework Help
Replies
12
Views
3K
  • Calculus and Beyond Homework Help
Replies
9
Views
1K
  • Calculus and Beyond Homework Help
Replies
13
Views
2K
  • Calculus and Beyond Homework Help
Replies
20
Views
1K
Back
Top