Testwiki:Reference desk/Archives/Mathematics/2020 October 21: Difference between revisions

From testwiki
Jump to navigation Jump to search
imported>Scsbot
edited by robot: archiving October 21
 
(No difference)

Latest revision as of 03:29, 29 October 2020

Template:Error:not substituted

{| width = "100%"

|- ! colspan="3" align="center" | Mathematics desk |- ! width="20%" align="left" | < October 20 ! width="25%" align="center"|<< Sep | October | Nov >> ! width="20%" align="right" |Current desk > |}

Welcome to the Wikipedia Mathematics Reference Desk Archives
The page you are currently viewing is a transcluded archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


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 kn2kn+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:

atan2(y,x)={arctan(yx)if x>0,arctan(yx)+πif x<0 and y0,arctan(yx)πif x<0 and y<0,+π2if x=0 and y>0,π2if x=0 and y<0,undefinedif x=0 and y=0.

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π), but you'd still be distinguishing between cases no matter what you pick. –Deacon Vorbis (carbon • videos) 17:51, 21 October 2020 (UTC)
Template:BccMy 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, π/2 and 5π/2 represent the same angle in the plane, but they're still two different numbers. You have to pick Template:Em half-open interval of length 2π 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 Template:Em and stick with it. –Deacon Vorbis (carbon • videos) 18:24, 21 October 2020 (UTC)
Template:PbTo add a little to that, if, for example, you used arctan(y/x)+π for both cases when x<0, as you seem to be hinting at, then you'd get something in the range (π/2,3π/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)
Template:BccThat 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 atan2 mathematically (ignoring the fact that computations with floating point numbers cannot be always exact) is as follows:
For r>0 and φ(π,π], atan2(rsinφ,rcosφ)=φ.
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 φ we need a constraint of either the form φ(α2π,α] or φ[α,α+2π) for some fixed α. The choice φ[0,2π) would have been reasonable, but probably the desire to have the identity atan2(y,1)=arctany be valid led to the choice we have now.  --Lambiam 21:08, 21 October 2020 (UTC)