My Math Forum Number of terms in a sequence of primes

 Number Theory Number Theory Math Forum

 April 16th, 2011, 11:01 AM #1 Newbie   Joined: Oct 2009 Posts: 14 Thanks: 0 Number of terms in a sequence of primes Dear all, I'm trying to figure out how many terms are in this sequence: $2, 4, 6, ..., p - 3, p - 1$, where $p$ is an odd prime. I can't see the answer immediately, so I tried some smaller sequences: i) For $p= 4$ (ie) $2, 4, 6, 8$: There are $4= \frac{7 + 1}{2}$ terms. ii) For $p= 5$ (ie) $2, 4, 6, 8, 10$: There are $5= \frac{9 + 1}{2}$ terms. So for $p= k - 1$ terms, I reasoned that there'd be $\frac{k - 1}{2}= \frac{[(k - 1) - 1] + 1}{2}$ terms. But the correct answer is $\frac{k + 1}{2}$. Where have I gotten wrong? This may seem an easy question, but it's from a more complicated question so I thought to post it here. Thank you very much1
 April 16th, 2011, 11:42 AM #2 Senior Member   Joined: Apr 2011 From: Recife, BR Posts: 352 Thanks: 0 Re: Number of terms in a sequence of primes this is actually an arithmetic progression question, p being an odd prime doesn't interfere in the answer. dividing the sequence by 2 yields $1,2,3..,\frac{p-1}{2}$, which has obviously$\frac{p-1}{2}$ terms, the same number of terms of the original sequence. Where did "k" come from anyways?
 April 17th, 2011, 08:31 AM #3 Newbie   Joined: Oct 2009 Posts: 14 Thanks: 0 Re: Number of terms in a sequence of primes Thanks for your response, proglote. So why does the solution say that there are $\frac{p + 1}{2}$ terms? And I used $k$ to illustrate my reasoning when we had $p - 1$ terms (so that I didn't have to write $p= p - 1$ ). In any case, I asked the original question since I am trying to figure out these two steps for a question on number theory: $1 \times 3 \times ... \times (p - 2) \equiv (-2) \times (-4) \times ... \times -(p - 1) \pmod {p}$ $\Longrightarrow ? 1 \times 3 \times ... \times (p - 2) \equiv (-1)^{\frac{p +1}{2}} \times (2) \times (4) \times ... \times (p - 1) \pmod {p}$
 April 17th, 2011, 10:41 AM #4 Member   Joined: Jul 2010 Posts: 44 Thanks: 0 Re: Number of terms in a sequence of primes The solution could possibly be taking into account zero as the first term. Otherwise you've got it all right I believe
 April 17th, 2011, 11:17 AM #5 Math Team   Joined: Apr 2010 Posts: 2,780 Thanks: 361 Re: Number of terms in a sequence of primes The statement is also: $(p-2)!! \equiv (-1)^{\frac{p-1}{2}} \cdot (p-1)!! \bmod p$ k!! is a double factorial
April 19th, 2011, 01:00 PM   #6
Newbie

Joined: Oct 2009

Posts: 14
Thanks: 0

Re: Number of terms in a sequence of primes

Quote:
 Originally Posted by mrtamborineman10 The solution could possibly be taking into account zero as the first term. Otherwise you've got it all right I believe
Thanks for the replies.

@mrtamborineman10: Could you please explain what you mean by zero as the first term?

We have:
$1 \times 3 \times ... \times (p - 2) \equiv (-2) \times (-4) \times ... \times -(p - 1) \pmod {p}$, where the RHS starts with $(-2)$. Where would the 0 appear?

@Hoempa: We haven't done double factorials so that confuses me a bit. Could you explain without double factorials?

 Tags number, primes, sequence, terms

 Thread Tools Display Modes Linear Mode

 Similar Threads Thread Thread Starter Forum Replies Last Post caters Number Theory 67 March 19th, 2014 04:32 PM proglote Calculus 2 April 9th, 2012 09:56 AM Bogauss Number Theory 12 January 13th, 2011 03:33 PM reddd Algebra 3 May 21st, 2010 02:08 PM momo Number Theory 16 February 24th, 2010 05:11 AM

 Contact - Home - Forums - Cryptocurrency Forum - Top