# Wikipedia:Reference desk/Mathematics

Welcome to the mathematics reference desk.

Main page: Help searching Wikipedia

How can I get my question answered?

• Provide a short header that gives the general topic of the question.
• Type '~~~~' (that is, four tilde characters) at the end – this signs and dates your contribution so we know who wrote what and when.
• Post your question to only one desk.
• Don't post personal contact information – it will be removed. All answers will be provided here.
• Specific questions, that are likely to produce reliable sources, will tend to get clearer answers.
• Note:
• We don't answer (and may remove) questions that require medical diagnosis or legal advice.
• We don't answer requests for opinions, predictions or debate.
• We don't conduct original research or provide a free source of ideas, but we'll help you find information you need.

How do I answer a question?

Main page: Wikipedia:Reference desk/Guidelines

Choose a topic:

# October 21

## Primes of the form kn^2 - kn + 1

Has anyone ever made any conjectures related to this statement:

The sequences of the form $kn^{2}-kn+1$ produce infinitely many primes for all $k<>4$ . (For $k=4$ , the sequence is simply the odd squares.) Georgia guy (talk) 13:52, 21 October 2020 (UTC)

The formula is somewhat reminiscent of the Lucky numbers of Euler. CodeTalker (talk) 18:34, 21 October 2020 (UTC)
This seems to be a special case of the Bunyakovsky conjecture, which in turn is a generalization of Landau's fourth problem. The numbers themselves are (in most cases) Centered polygonal numbers. (I'm not entirely convinced that article meets WP's notability criteria but I've used up my orange tag quota for the month.) For fixed k there are certain things you can say about the possible prime factors of these numbers, for example if a prime divides n^2 - n + 1 then it must be 3 or congruent to 1 mod 3. This, in turn affects the "probability" that a number of this form will be prime, and from there you can make an educated guess at the frequency of such primes. But that's a long way from a proof and in general problems like this are usually either relatively easy or completely intractable, with Dirichlet's theorem on arithmetic progressions being one of the few cases that lie in the middle somewhere. --RDBury (talk) 20:07, 21 October 2020 (UTC)

## Calculating the value of arctan2(x, y)

Our article atan2 states that the function can be calculated as follows:

$\operatorname {atan2} (y,x)={\begin{cases}\arctan({\frac {y}{x}})&{\text{if }}x>0,\\\arctan({\frac {y}{x}})+\pi &{\text{if }}x<0{\text{ and }}y\geq 0,\\\arctan({\frac {y}{x}})-\pi &{\text{if }}x<0{\text{ and }}y<0,\\+{\frac {\pi }{2}}&{\text{if }}x=0{\text{ and }}y>0,\\-{\frac {\pi }{2}}&{\text{if }}x=0{\text{ and }}y<0,\\{\text{undefined}}&{\text{if }}x=0{\text{ and }}y=0.\end{cases}}$ I'm new to polar coordinates and I'm not that familiar with how they work. When x < 0, why should the definition distinguish between positive and negative values of y? For any angle in radians, adding or subtracting pi should have the same effect. At least, that's my impression from high school math. Why should that not apply here? --PuzzledvegetableIs it teatime already? 17:39, 21 October 2020 (UTC)

I'm not really sure what you're asking, but essentially because atan2 is defined that way. You could define an atan3 that returns a value in the range $[0,2\pi ),$ but you'd still be distinguishing between cases no matter what you pick. –Deacon Vorbis (carbon • videos) 17:51, 21 October 2020 (UTC)
My question is why atan2 is defined that way. My somewhat unsophisticated understanding of angles is that adding pi to an angle, and subtracting pi from the same angle, should have the same result. Pi takes you halfway around the circle, regardless of which "direction" you take. So, why distinguish between positive and negative values of y if we're doing the same thing anyway? --PuzzledvegetableIs it teatime already? 18:12, 21 October 2020 (UTC) + minor edit --PuzzledvegetableIs it teatime already? 18:14, 21 October 2020 (UTC)
I mean, $\pi /2$ and $5\pi /2$ represent the same angle in the plane, but they're still two different numbers. You have to pick some half-open interval of length $2\pi$ to return values in. If you mean, why this particular choice? I'm just guessing a bit, but probably because it's centered around 0, just like the regular arctangent. As far as which endpoint to include...ehh, I guess one favors the positive choice? It doesn't really make much difference. But you have to pick something and stick with it. –Deacon Vorbis (carbon • videos) 18:24, 21 October 2020 (UTC)
To add a little to that, if, for example, you used $\arctan(y/x)+\pi$ for both cases when $x<0,$ as you seem to be hinting at, then you'd get something in the range $(-\pi /2,3\pi /2).$ You'd still have to decide which endpoint to include. This would also be a valid definition, but it's probably a less natural one due to the lack of symmetry. –Deacon Vorbis (carbon • videos) 18:29, 21 October 2020 (UTC)
That makes sense, but shouldn't it be the opposite? When y is negative, using arctan rather than atan2 would result in a point that is in quadrant I. To compensate for this, you should need to add pi to the angle to get it back to quadrant III. When y is positive using arctan rather than atan2 would result in a point that is in quadrant IV. To compensate for this, you should need to subtract pi to get it back to quadrant II. Yet, the definition seems to say the opposite. I thought that angles increase in a counter-clockwise direction. --PuzzledvegetableIs it teatime already? 18:43, 21 October 2020 (UTC)
A more indirect way of defining $\mathrm {atan2}$ mathematically (ignoring the fact that computations with floating point numbers cannot be always exact) is as follows:
For $r>0$ and $\varphi \in (-\pi ,\pi ]$ , $~\mathrm {atan2} (r\sin \varphi ,r\cos \varphi )=\varphi .$ For a relationship of this kind to hold, $r$ needs to be constrained either to be positive or to be negative; few people will contest that $r>0$ is the better choice. For $\varphi$ we need a constraint of either the form $\varphi \in (\alpha -2\pi ,\alpha ]$ or $\varphi \in [\alpha ,\alpha +2\pi )$ for some fixed $\alpha .$ The choice $\varphi \in [0,2\pi )$ would have been reasonable, but probably the desire to have the identity $\mathrm {atan2} (y,1)=\arctan y$ be valid led to the choice we have now.  --Lambiam 21:08, 21 October 2020 (UTC)

# October 22

## Number of roots of polinomial in fields other than C

Hi,

if I am not mistaken, the fundermental theorem of Algebra states that there are at most $deg(p)$ roots of a polinomial $p\in \mathbb {C} [X]$ . Does this still hold true for finite fields?

Thanks TheFibonacciEffect (talk) 16:04, 22 October 2020 (UTC)

First, that degree-n polynomials have at most n roots over any field is reasonably straightforward to show; whenever a is a root, you can factor out (xa). In fact, this much remains true for polynomials over any integral domain.
The FToA says that every complex polynomial has at least one complex root. Combining this with the above observation, it follows that every such polynomial has exactly n roots (counted with multiplicity). However, finite fields are not algebraically closed, so there exist polynomials over them with no roots. In fact, finite fields will always have degree-2 polynonmials without roots; this can shown by a counting argument. –Deacon Vorbis (carbon • videos) 16:25, 22 October 2020 (UTC)
For a simple example, $X^{2}\equiv ~3\!\!\!{\pmod {4}}$ has no integer solution, i.e. $X^{2}-3$ in $\mathbb {Z} _{4}$ has no root. TigraanClick here to contact me 08:50, 23 October 2020 (UTC)
Thank you
- TheFibonacciEffect (talk) 11:14, 23 October 2020 (UTC)
@Tigraan: But $\mathbb {Z} _{4}$ is not a field, no? Double sharp (talk) 13:49, 26 October 2020 (UTC)
I meant to say something here but forgot. No, it's not (it's not even an integral domain, which is equivalent to not being a field for finite objects anyway). And the bit about having no more roots than degree can fail when you're not in an integral domain. For example, the polynomial $p(x)=2x^{2}+2x$ has 4 roots in $\mathbb {Z} /4.$ Deacon Vorbis (carbon • videos) 14:16, 26 October 2020 (UTC)
In $\mathbb {Z} _{3}$ , the polynomial $X^{2}+1$ has no roots.  --Lambiam 21:37, 26 October 2020 (UTC)