8

How would you describe the set $\{1, 5, 9, 13, 17, 21,\dots\}$ in the style of $x:P(x)=$? I know that the sequence is "the last number + 4" or $4n-3$.

amWhy
  • 209,954
user265554
  • 2,853

8 Answers8

42

$\{n \in \mathbb N\; :\; n \equiv 1 \mod 4\}$

Robert Israel
  • 448,999
  • How do you distinguish between (n≡1) mod 4 and n≡(1 mod 4) ? – Joshua Aug 31 '15 at 20:38
  • 14
    If you're going to put in parentheses at all, it should be $n \equiv 1 \ (\text{mod}; 4)$. See https://en.wikipedia.org/wiki/Modular_arithmetic#Congruence_relation – Robert Israel Aug 31 '15 at 21:01
  • (1 mod 4) is valid. (7 mod 4) + 3 = 6. – Joshua Aug 31 '15 at 21:23
  • 14
    @Joshua You're confusing modular congruence with the binary modulus operation. The usage above is designating modular congruence. – apnorton Sep 01 '15 at 00:19
  • @Joshua The correct way to write it using the binary modulus operation is $(n\bmod 4)=(1\bmod 4)$, or, since $1\bmod 4=1$, $(n\bmod 4)=1$. – Mario Carneiro Sep 01 '15 at 02:34
  • 2
    @MarioCarneiro "Correct" here is a very vague and difficult notion. Once you state clearly at the beginnin, that you work in $\mathbb{Z}/n\mathbb{Z}$ a lot, you can safely use $k\equiv 4\operatorname{mod} n$ and everybody knows what you mean. – yo' Sep 01 '15 at 08:17
  • @yo' I'm by no means asserting that it would be incorrect to write it using modular equivalence; indeed in this case I'd probably prefer it. However, for any statement using modular equivalence there is an equivalent statement using the modulo operator and vice versa, and I was merely detailing how you would write it the other way. – Mario Carneiro Sep 01 '15 at 09:36
30

$\{4k-3 \mid k \in \mathbb{N} \}$ or $\{4k+1 \mid k \in \mathbb{N} \}$, depending on whether you consider $0$ a natural number.

xxxxxxxxx
  • 13,302
  • 5
    I think of the options presented so far, this is the nicest in that: (i) it doesn't require an understanding of modular arithmetic; (ii) it avoids confusion with quantifiers; and (iii) it most clearly captures the sequence via the mapping ${1\to 1, 2\to 5, 3\to 9,\dotsc}$. – Joshua Taylor Sep 01 '15 at 02:29
17

$$\{n \; \mid \; \exists k \in \mathbb N: n =4k-3\}$$

wythagoras
  • 25,026
  • Couldn't the quantifier be the universal quantifier instead of the existential one? Isn't the thing true for all natural numbers k (excluding 0)? – user265554 Aug 31 '15 at 18:04
  • 3
    No. Try to find such $k$ for $n=2$, please. Also, if I write $\forall k \in \mathbb N : n=4k-3$, and n is in this set, then we have n=41-3=42-3=43-3=44-3=.... which is clearly not true for any $n$. – wythagoras Aug 31 '15 at 18:07
  • But why should n ever equal 2? I need to describe the set 1, 5, 9,... , there's no 2 in there anywhere. – user265554 Aug 31 '15 at 18:15
  • I meant that there is clearly(?) no natural $k$ for $n=2$: $k=1$ gives $n=1$, $k\geq2$ gives $n\geq5$. – wythagoras Aug 31 '15 at 18:17
  • Sorry, I still don't quite get it. If it were for all natural numbers k, wouldn't that be just 4x1-3=1, 4x2-3=5, 4x3-3=9,... and that would give all the numbers of the set? – user265554 Aug 31 '15 at 18:23
  • Yes. That is your set right? – wythagoras Aug 31 '15 at 18:24
  • Yes it is. I'm just wondering why it couldn't be the universal quantifier. Then every natural number k would give the next member of the set, starting from 1. – user265554 Aug 31 '15 at 18:27
  • It is the set of all $n$ such that there exists a natural $k$ such that $n=4k-3$. So 1 is in the set because we can take $k=1$. 2,3,4, are not in the set because we can't find such $k$. 5 is in the set because we can take $k=2$. – wythagoras Aug 31 '15 at 18:40
  • 1
    Secondly, if I write $\forall k \in \mathbb N : n=4k-3$, then I am searching for $n$ that statistify $n=4k-3$ for ALL natural $k$. So we have $n=4\cdot1-3=1$ because it must hold for $k=1$. We also have $n=4\cdot2-3=5$ because it must hold for $k=2$. So there can't be such n. – wythagoras Aug 31 '15 at 18:42
  • Oh now I get it! I was thinking about it all backwards. Thank you so much! – user265554 Aug 31 '15 at 18:47
  • Why not flip it around? ${n | n=4k-3 ; \forall k \in \mathbb{N}}$. I think this is more straightforward. Or a little more simply, ${n | n=4k-3, ; k \in \mathbb{N}}$. – El'endia Starman Sep 01 '15 at 00:35
  • 2
    @El'endiaStarman In that route, it'd be even easier to say ${4n-3 \mid n \in \mathbb{N}}$ – Joshua Taylor Sep 01 '15 at 02:27
  • 1
    @JoshuaTaylor: That's the best. – El'endia Starman Sep 01 '15 at 02:29
  • 2
    @El'endiaStarman I didn't see it before my comment, but Morgan Rodgers posted it as an answer, too. – Joshua Taylor Sep 01 '15 at 02:31
3

An arithmetic progression with first term 1 and common difference 4

(No I haven't described it in the form of $P(x)$, but this is how I would describe this number sequence...)

David Quinn
  • 34,121
3

It's not exactly the form you're looking for, but close: $$ \{n\in\mathbb N \text{ [or }\mathbb R \text{ or whatever relevant]}: (n-1)/4 \in \mathbb N\} $$ If you really need an equality, then you might write $$ \{n\in\mathbb N: \mathbf1 _{\mathbb{N}} (n-1)/4 = 1\} $$ where $\mathbf1 _{\mathbb{N}}$ is the indicator function of the set $\mathbb N$.

eudes
  • 437
3

You can be as simple as this, given you don't insist on the $\{:\}$ set declaration:

$$4\mathbb{N}-3 = \{1,5,9,13,17,\dotsc\}$$

if $0\notin\mathbb{N}$ by your convention; and

$$4\mathbb{N}+1 = \{1,5,9,13,17,\dotsc\}$$

if $0\in\mathbb{N}$ by your convention.

yo'
  • 4,506
3

You can represent your set as the Range set of a Function from $\Bbb N$ to $\Bbb N$ itself defined as:

$$f(x)=4x+1$$

AlienRem
  • 4,011
  • The codomain of a function $\Bbb N\to\Bbb N$ is always $\Bbb N$. The notion you mean is called image or (sometimes) range. Please don't use the term "codomain" which is specifically meant to be something different, namely the set $Y$ for a function that was specified as being $X\to Y$, regardless of the actual values the function takes. – Marc van Leeuwen Sep 02 '15 at 11:49
  • Yeah sry for the ambiguity, now it should be clearer @MarcvanLeeuwen – AlienRem Sep 02 '15 at 11:51
3

$\{n\in\mathbb N:\frac{n+3}4\in\mathbb N\}$

bof
  • 78,265