Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Help with a math problem
Index -> Off Topic
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Panphobia




PostPosted: Fri May 17, 2013 11:40 pm   Post subject: Help with a math problem

I was looking around the internet for some math problems and I came across this
code:
Given the infinite 2 dimensional sequence, shown below,
show that if n is an entry on the table then 2n + 1 is a
composite number
4     7     10    13 .....
7     12    17    22 .....
10    17    24    31 .....
13    22    31    40 .....
What I came up with so far is that
code:
(2[i][j] + 1) / ((i, j) - (i - 1, j)) = (i, j) - (i, j - 1)
So how do I prove that with the pattern of the 2d matrix, that at every n, 2n+1 is non-prime
Sponsor
Sponsor
Sponsor
sponsor
Dreadnought




PostPosted: Sat May 18, 2013 11:04 am   Post subject: Re: Help with a math problem

Here's my solution (it's easier if you know modular arithmetic, but I'm assuming you don't).

code:
Observe that the entries in the nth row have a remainder of n when divided by 2n+1 (you add three to the numbers in the previous row, but only 2 to 2n + 1).
Then, for an entry x in the nth row the remainder when divided by 2n + 1 is n.
Then the remainder for 2x + 1 is 2n + 1, but we are dividing by 2n + 1, so the remainder is zero.
Thus 2x + 1 is divisible by 2n +1, so 2x + 1 is composite.
Insectoid




PostPosted: Sat May 18, 2013 12:10 pm   Post subject: RE:Help with a math problem

Quote:
you add three to the numbers in the previous row


This only holds true for the first column.
Dreadnought




PostPosted: Sat May 18, 2013 1:57 pm   Post subject: Re: Help with a math problem

Insectoid wrote:

Quote:
you add three to the numbers in the previous row


This only holds true for the first column.

Yes, I typed this quickly before I went grocery shopping (was almost late for the bus). It was just a quick argument to show the remainder property holds for the first column (I shouldn't have said "the previous row"). Once you're convinced that it does, it clearly holds for each row since we add 2n + 1 (where n is the row index) to subsequent entries in the same row.
Display posts from previous:   
   Index -> Off Topic
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: