Knowledge (XXG)

:Reference desk/Mathematics - Knowledge (XXG)

Source 📝

Welcome to the mathematics section
of the Knowledge (XXG) reference desk.
Select a section:
Want a faster answer?

Main page: Help searching Knowledge (XXG)

   

How can I get my question answered?

  • Select the section of the desk that best fits the general topic of your question (see the navigation column to the right).
  • Post your question to only one section, providing a short header that gives the topic of your question.
  • Type '~~~~' (that is, four tilde characters) at the end – this signs and dates your contribution so we know who wrote what and when.
  • Don't post personal contact information – it will be removed. Any answers will be provided here.
  • Please be as specific as possible, and include all relevant context – the usefulness of answers may depend on the context.
  • 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 do your homework for you, though we'll help you past the stuck point.
    • 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: Knowledge (XXG):Reference desk/Guidelines

  • The best answers address the question directly, and back up facts with wikilinks and links to sources. Do not edit others' comments and do not give any medical or legal advice.
See also:

September 5

Anomalous result

Solve for x:

  • x + 1 {\displaystyle {\sqrt {x+1}}} = x - 1.

Here's my approach, step by step:

  • Square both sides:
x + 1 = x 2 {\displaystyle {x^{2}}} - 2x + 1
  • Cancel 1's:
x = x 2 {\displaystyle {x^{2}}} - 2x
  • Collect x's:
x 2 {\displaystyle {x^{2}}} - 3x = 0
  • Factorise:
x (x - 3) = 0
  • Solution:
x = 0 or 3.

So far, so good. Or so it seems.

Plug 3 back into the original equation:

  • 3 + 1 {\displaystyle {\sqrt {3+1}}} = 3 - 1
  • 4 {\displaystyle {\sqrt {4}}} = 2 = 3 - 1. Correct

Plug 0 back into the original equation:

  • 0 + 1 {\displaystyle {\sqrt {0+1}}} = 0 - 1
  • 1 {\displaystyle {\sqrt {1}}} = 1 =/= 0 - 1. Incorrect.

I've gone over this a dozen or more times but cannot see what really basic error I must be making.

Any ideas? -- Jack of Oz 22:06, 5 September 2024 (UTC)

You didn't do anything really wrong, but just discovered that 0 is an "Extraneous solution to the problem. As our article says, they "result from performing operations that are not invertible for some or all values of the variables involved, which prevents the chain of logical implications from being bidirectional."
The problem is that squaring is not a one-to-one function, so its inverse, square-rooting needs to be carefully defined. That is, -5 and 5 squared are both 25. So we must pick one of them as "the" square root if we want to define a function, something that spits out just one value "5" when fed "25". If we defined "square root" as Euler did and said either are square roots, then 0 is perfectly good solution. In modern terms it would amount to solving ± x + 1 {\displaystyle {\sqrt {x+1}}} = x - 1John Z (talk) 23:19, 5 September 2024 (UTC)
You proved that x + 1 = x 1 {\displaystyle {\sqrt {x+1}}=x-1} implies ( x = 0 {\displaystyle (x=0} or x = 3 ) . {\displaystyle x=3).} Indeed, if x = 3 {\displaystyle x=3} (the only true solution), it is the case that x = 0 {\displaystyle x=0} or x = 3. {\displaystyle x=3.} You appear to assume that the converse implication also holds, but this assumption is unwarranted. The false solution is introduced by the squaring operation; it adds solutions of the equation   x + 1 = x 1. {\displaystyle ~{-}{\sqrt {x+1}}=x-1.} A simpler puzzle based on the same issue is the following:
  • Solve for x {\displaystyle x} the equation
    x = 1. {\displaystyle {\sqrt {x}}=-1.}
  • Square both sides:
    x = 1. {\displaystyle x=1.}
  • Plug 1 {\displaystyle 1} for x {\displaystyle x} into the original equation:
    1 = 1. {\displaystyle {\sqrt {1}}=-1.}
  • What gives?
What we found is the solution of the equation   x = 1. {\displaystyle ~{-}{\sqrt {x}}=-1.}  --Lambiam 23:17, 5 September 2024 (UTC)
Wow, that really is basic. But not obvious. I've been aware forever that the sq rt sign X {\displaystyle {\sqrt {X}}} is always taken to be the positive root only of X unless modified by a - or ± in front; whereas, the words "the square root of X" mean both positive and negative roots. What I've never quite focussed on is the dangers of squaring, if I can put it that way. Squaring both sides of an equation is a tool we all learn early in our algebraic studies, but I don't remember this particular hazard ever being brought to my attention. But then, my most recent formal mathematical studies were in 1984 .
Thanks for a very enlightening set of answers. -- Jack of Oz 20:16, 6 September 2024 (UTC)
Resolved

September 6

Distance to a line segment

I am unsure if this is better in Maths or in Computing, but I've chosen Maths.

In a standard planar (x,y) world, a line segment is defined by two endpoints P1=(x1,y1) and P2=(x2,y2).

A third point (anywhere, not necessarily off the line segment extension) is A=(xa,ya).

It is easy to calculate the distance from A to P1 and from A to P2. Sometimes one will be the answer for which part of the line segment is closest to A.

But if A is "perpendicularly within P1~P2", then the closest part of P1~P2 will be somewhere on that line segment.

Is there a standard algorithm for determining the coordinates of the closest part of the line segment to A?

--SGBailey (talk) 22:59, 6 September 2024 (UTC)

I don't know if it's "standard", but it's not too hard to work out. Let D be the square distance between P1 and P2, so D = (x2-x1) + (y2-y1). Let E be twice the (signed) area of the triangle P1P2A, so E = x1y2 - x1ya - x2y1 + x2ya + xay1 - xay2. Note that if D=0 then the result is undefined, if E=0 then the result is just A, if x1=x2 then y=ya, and if y1=y2 then x=xa; these facts can be used as checks. Then, using Cramer's rule and a few tricks I'm pretty sure I wouldn't be able to fully explain, I get x = xa + (y2-y1)E/D, y = ya - (x2-x1)E/D. Geometrically, you know that the vector PA is perpendicular to P1P2, which means P can be written A + mP1P2, where P1P2 is normal to P1P2; we can take this as (-(y2-y1), x2-x1). You can then solve for m by finding the area of the triangle P1P2A in two ways. Note that if you just want the distance to the line it's a lot easier, just divide twice the area of the triangle, |E|, by the length of the segment P1P2. I'm assuming here that you want the closest point to the line P1P2, since there's no guarantee that the result P will be between P1 and P2, and if not it technically won't be on the segment P1P2. --RDBury (talk) 05:51, 7 September 2024 (UTC)
Here is an analytic approach. The line through the distinct points P 1 {\displaystyle {\text{P}}_{1}} and P 2 {\displaystyle {\text{P}}_{2}} can be parametrically represented by
( x , y ) = ( λ x 1 + ( 1 λ ) x 2 , λ y 1 + ( 1 λ ) y 2 ) . {\displaystyle (x,y)=(\lambda x_{1}+(1-\lambda )x_{2},\lambda y_{1}+(1-\lambda )y_{2}).}
(The usual equation for the line can be obtained by eliminating λ {\displaystyle \lambda } from this equation.)
The vector connecting a generic point ( x , y ) {\displaystyle (x,y)} on the line to a point ( x A , y A ) {\displaystyle (x_{\text{A}},y_{\text{A}})} not on the line is then given by
( λ x 1 + ( 1 λ ) x 2 x A , λ y 1 + ( 1 λ ) y 2 y A ) . {\displaystyle (\lambda x_{1}+(1-\lambda )x_{2}-x_{\text{A}},\lambda y_{1}+(1-\lambda )y_{2}-y_{\text{A}}).}
The length of this vector is minimized when its square is, which is given by the quantity
f ( λ ) = ( λ x 1 + ( 1 λ ) x 2 x A ) 2 + ( λ y 1 + ( 1 λ ) y 2 y A ) 2 . {\displaystyle f(\lambda )=(\lambda x_{1}+(1-\lambda )x_{2}-x_{\text{A}})^{2}+(\lambda y_{1}+(1-\lambda )y_{2}-y_{\text{A}})^{2}.}
Now solve d d λ f ( λ ) = 0 {\displaystyle {\frac {d}{d\lambda }}f(\lambda )=0} for λ {\displaystyle \lambda } and substitute the result in the parametric equation and you have the coordinates of the nearest point. Note: if A {\displaystyle {\text{A}}} is on the line, this procedure may lead to division by zero.
(If done by hand, it helps to first rewrite the parametric equation as
( x , y ) = ( λ ( x 1 x 2 ) + x 2 , λ ( y 1 y 2 ) + y 2 ) . {\displaystyle (x,y)=(\lambda (x_{1}-x_{2})+x_{2},\lambda (y_{1}-y_{2})+y_{2}).}
Also, alternatively, to avoid differentiation, rewrite the equation for f ( λ ) {\displaystyle f(\lambda )} in the form f ( λ ) = a λ 2 + b λ + c . {\displaystyle f(\lambda )=a\lambda ^{2}+b\lambda +c.} The value of λ {\displaystyle \lambda } minimizing f ( λ ) {\displaystyle f(\lambda )} is then given by λ = b 2 a . {\displaystyle \lambda =-{\frac {b}{2a}}.} )
 --Lambiam 06:47, 7 September 2024 (UTC)
One advantage to this method is that it works just as well in multiple dimensions. A more general version is: Given k points P1, ... Pk, and l points Q1, ... Ql in R, with k+l≤n-1, find a formula for the points P and Q where P is on the affine space determined by the Pi's, Q is on the affine space determined by the Qi's, and P and Q are a close as possible to each other. It might be easier if the affine planes were given by systems of equations instead of as affine hulls. --RDBury (talk) 07:31, 7 September 2024 (UTC)
PS. It might be worth mentioning that when you solve for lambda, the resulting point P will be the one where AP⊥P1P2, so you're basically just proving what was assumed in the original question. This holds for any smooth curve and even smooth surfaces; if P is the closest point to A on a smooth curve/surface, then PA is perpendicular to the tangent line/plane at P. --RDBury (talk) 01:53, 9 September 2024 (UTC)

Thanks. That is probably resolved, but I need to study the replies. -- SGBailey (talk) 18:02, 8 September 2024 (UTC)


September 11

120 being the smallest highly composite number

120 (number) says it is the "smallest highly composite number", but the OEIS contradicts this. Is there any definition of "highly composite number" that would make this true? Batrachoseps (talk) 02:29, 11 September 2024 (UTC)

It is specifically called the smallest highly composite number not adjacent to any prime. This is a true statement, if perhaps a bit confusingly phrased. Double sharp (talk) 03:08, 11 September 2024 (UTC)
I have rephrased the statement to clarify it. Double sharp (talk) 03:09, 11 September 2024 (UTC)
Thanks for rephrasing it. I had interpreted the sentence to mean "120 is the smallest highly composite number" and "120 is the first multiple of six with no adjacent prime number". Batrachoseps (talk) 03:12, 11 September 2024 (UTC)


September 13

Prove or disprove: These numbers are composite for all n>=2 such that these numbers are positive

Prove or disprove: These numbers are composite for all n>=2 such that these numbers are positive

  1. 5 n + 788 {\displaystyle 5^{n}+788}
  2. 5 n 92 {\displaystyle 5^{n}-92}
  3. 8 n + 1 {\displaystyle 8^{n}+1}
  4. 8 n + 27 {\displaystyle 8^{n}+27}
  5. 8 n + 47 {\displaystyle 8^{n}+47}
  6. 8 n 27 {\displaystyle 8^{n}-27}
  7. 9 n 4 {\displaystyle 9^{n}-4}
  8. 9 n 16 {\displaystyle 9^{n}-16}
  9. 11 n + 430 {\displaystyle 11^{n}+430}
  10. 11 n 184 {\displaystyle 11^{n}-184}
  11. 11 n 324 {\displaystyle 11^{n}-324}
  12. 12 n 25 {\displaystyle 12^{n}-25}
  13. 13 n 50 {\displaystyle 13^{n}-50}
  14. 13 n 216 {\displaystyle 13^{n}-216}
  15. 14 n + 11 {\displaystyle 14^{n}+11}
  16. 14 n 9 {\displaystyle 14^{n}-9}
  17. 14 n 11 {\displaystyle 14^{n}-11}
  18. 16 n 9 {\displaystyle 16^{n}-9}
  19. 17 n + 32 {\displaystyle 17^{n}+32}
  20. 23 n + 82 {\displaystyle 23^{n}+82}
  21. 23 n 112 {\displaystyle 23^{n}-112}
  22. 24 n 49 {\displaystyle 24^{n}-49}
  23. 27 n + 8 {\displaystyle 27^{n}+8}
  24. 27 n 8 {\displaystyle 27^{n}-8}
  25. 29 n + 4 {\displaystyle 29^{n}+4}
  26. 29 n + 10 {\displaystyle 29^{n}+10}
  27. 29 n + 26 {\displaystyle 29^{n}+26}
  28. 29 n 4 {\displaystyle 29^{n}-4}
  29. 29 n 26 {\displaystyle 29^{n}-26}
  30. 32 n + 1 {\displaystyle 32^{n}+1}
  31. 32 n + 23 {\displaystyle 32^{n}+23}
  32. 32 n 23 {\displaystyle 32^{n}-23}
  33. 32 n 29 {\displaystyle 32^{n}-29}
  34. 33 n 16 {\displaystyle 33^{n}-16}
  35. 34 n 29 {\displaystyle 34^{n}-29}
  36. 36 n 25 {\displaystyle 36^{n}-25}
  37. 38 n + 1 {\displaystyle 38^{n}+1}
  38. 38 n + 25 {\displaystyle 38^{n}+25}
  39. 38 n + 31 {\displaystyle 38^{n}+31}
  40. 38 n 13 {\displaystyle 38^{n}-13}
  41. 38 n 25 {\displaystyle 38^{n}-25}
  42. 39 n 4 {\displaystyle 39^{n}-4}

118.170.47.16 (talk) 08:18, 13 September 2024 (UTC)

Re   #3: 8 n + 1 = ( 2 n + 1 ) ( 4 n 2 n + 1 ) . {\displaystyle 8^{n}+1=(2^{n}+1)(4^{n}-2^{n}+1).}
Re   #4: 8 n + 27 = ( 2 n + 3 ) ( 4 n 3 2 n + 9 ) . {\displaystyle 8^{n}+27=(2^{n}+3)(4^{n}-3\cdot 2^{n}+9).}
Re   #6: 8 n 27 = ( 2 n 3 ) ( 4 n + 3 2 n + 9 ) . {\displaystyle 8^{n}-27=(2^{n}-3)(4^{n}+3\cdot 2^{n}+9).}
Re   #7: 9 n 4 = ( 3 n 2 ) ( 3 n + 2 ) . {\displaystyle 9^{n}-4=(3^{n}-2)(3^{n}+2).}
Re   #8: 9 n 16 = ( 3 n 4 ) ( 3 n + 4 ) . {\displaystyle 9^{n}-16=(3^{n}-4)(3^{n}+4).}
Re #23: 27 n + 8 = ( 3 n + 2 ) ( 9 n 2 3 n + 4 ) . {\displaystyle 27^{n}+8=(3^{n}+2)(9^{n}-2\cdot 3^{n}+4).}
Re #24: 27 n 8 = ( 3 n 2 ) ( 9 n + 2 3 n + 4 ) . {\displaystyle 27^{n}-8=(3^{n}-2)(9^{n}+2\cdot 3^{n}+4).}
Re #30: 32 n + 1 = ( 2 n + 1 ) ( 16 n 8 n + 4 n 2 n + 1 ) . {\displaystyle 32^{n}+1=(2^{n}+1)(16^{n}-8^{n}+4^{n}-2^{n}+1).}
Re #36: 36 n 25 = ( 6 n 5 ) ( 6 n + 5 ) . {\displaystyle 36^{n}-25=(6^{n}-5)(6^{n}+5).}
These are all special cases of the difference of two nth powers.  --Lambiam 10:23, 13 September 2024 (UTC)
Do your own homework. SamuelRiv (talk) 15:34, 13 September 2024 (UTC)
Based on other posts with this type of number theoretic-focused content coming from IPs in the same geographic area (north Taiwan), I'm pretty sure this isn't meant to be homework. WP:CRUFT, perhaps, but this is the Reference Desk, and it seems to me that it's a lot less of an issue to have it here than elsewhere. GalacticShoe (talk) 16:52, 13 September 2024 (UTC)
For all of these which are not listed as always composite or having a prime, I tested n 10000 {\displaystyle n\leq 10000} and didn't find any primes.
  1. Prime: 5 10899 + 788 {\displaystyle 5^{10899}+788} is probably prime. Note that 5 n + 788 {\displaystyle 5^{n}+788} is divisible by 3 {\displaystyle 3} when n {\displaystyle n} is even, 13 {\displaystyle 13} when n 1 ( mod 4 ) {\displaystyle n\equiv 1\!\!{\pmod {4}}} , and 7 {\displaystyle 7} when n 5 ( mod 6 ) {\displaystyle n\equiv 5\!\!{\pmod {6}}} , so when there is such a prime then n 3 , 7 ( mod 12 ) {\displaystyle n\equiv 3,7\!\!{\pmod {12}}} . Thanks to RDBury for helping establish compositeness originally for n 1000 {\displaystyle n\leq 1000} .
  2. Unknown: 5 n 92 {\displaystyle 5^{n}-92} is divisible by 3 {\displaystyle 3} when n {\displaystyle n} is odd, 13 {\displaystyle 13} when n 0 ( mod 4 ) {\displaystyle n\equiv 0\!\!{\pmod {4}}} , and 7 {\displaystyle 7} when n 0 ( mod 6 ) {\displaystyle n\equiv 0\!\!{\pmod {6}}} , so if there is such a prime then n 2 , 10 ( mod 12 ) {\displaystyle n\equiv 2,10\!\!{\pmod {12}}} .
  3. Always composite: 8 n + 1 {\displaystyle 8^{n}+1} can be factorized.
  4. Always composite: 8 n + 27 {\displaystyle 8^{n}+27} can be factorized.
  5. Always composite: 8 n + 47 {\displaystyle 8^{n}+47} is divisible by 3 {\displaystyle 3} when n {\displaystyle n} is even, 5 {\displaystyle 5} when n 1 ( mod 4 ) {\displaystyle n\equiv 1\!\!{\pmod {4}}} , and 13 {\displaystyle 13} when n 3 ( mod 4 ) {\displaystyle n\equiv 3\!\!{\pmod {4}}} .
  6. Always composite: 8 n 27 {\displaystyle 8^{n}-27} can be factorized.
  7. Always composite: 9 n 4 {\displaystyle 9^{n}-4} can be factorized.
  8. Always composite: 9 n 16 {\displaystyle 9^{n}-16} can be factorized.
  9. Unknown: 11 n + 430 {\displaystyle 11^{n}+430} is divisible by 3 {\displaystyle 3} when n {\displaystyle n} is odd, 7 {\displaystyle 7} when n 1 ( mod 3 ) {\displaystyle n\equiv 1\!\!{\pmod {3}}} , 19 {\displaystyle 19} when n 2 ( mod 3 ) {\displaystyle n\equiv 2\!\!{\pmod {3}}} , and 13 {\displaystyle 13} when n 6 ( mod 12 ) {\displaystyle n\equiv 6\!\!{\pmod {12}}} , so if there is such a prime then n 0 ( mod 12 ) {\displaystyle n\equiv 0\!\!{\pmod {12}}} .
  10. Unknown: 11 n 184 {\displaystyle 11^{n}-184} is divisible by 3 {\displaystyle 3} when n {\displaystyle n} is even, 7 {\displaystyle 7} when n 2 ( mod 3 ) {\displaystyle n\equiv 2\!\!{\pmod {3}}} , 37 {\displaystyle 37} when n 3 ( mod 6 ) {\displaystyle n\equiv 3\!\!{\pmod {6}}} , and 13 {\displaystyle 13} when n 7 ( mod 12 ) {\displaystyle n\equiv 7\!\!{\pmod {12}}} , so if there is such a prime then n 1 ( mod 12 ) {\displaystyle n\equiv 1\!\!{\pmod {12}}} .
  11. Unknown: 11 n 324 {\displaystyle 11^{n}-324} is divisible by 19 {\displaystyle 19} when n 0 ( mod 3 ) {\displaystyle n\equiv 0\!\!{\pmod {3}}} and 7 {\displaystyle 7} when n 2 ( mod 3 ) {\displaystyle n\equiv 2\!\!{\pmod {3}}} , and it becomes a difference of squares if n {\displaystyle n} is even, so if there is such a prime then n 1 ( mod 6 ) {\displaystyle n\equiv 1\!\!{\pmod {6}}} .
  12. Always composite: 12 n 25 {\displaystyle 12^{n}-25} is divisible by 13 {\displaystyle 13} when n {\displaystyle n} is odd, and it becomes a difference of squares if n {\displaystyle n} is even.
  13. Unknown: 13 n 50 {\displaystyle 13^{n}-50} is divisible by 7 {\displaystyle 7} when n {\displaystyle n} is even, so if there is such a prime then n {\displaystyle n} is odd.
  14. Prime: 13 5702 216 {\displaystyle 13^{5702}-216} is probably prime. Note that 13 n 216 {\displaystyle 13^{n}-216} is divisible by 7 {\displaystyle 7} when n {\displaystyle n} is odd and 5 {\displaystyle 5} when n 0 ( mod 4 ) {\displaystyle n\equiv 0\!\!{\pmod {4}}} , and it becomes a difference of cubes if n 0 ( mod 3 ) {\displaystyle n\equiv 0\!\!{\pmod {3}}} , so when there is such a prime then n 2 , 10 ( mod 12 ) {\displaystyle n\equiv 2,10\!\!{\pmod {12}}} .
  15. Always composite: 14 n + 11 {\displaystyle 14^{n}+11} is divisible by 5 {\displaystyle 5} when n {\displaystyle n} is odd and 3 {\displaystyle 3} when n {\displaystyle n} is even.
  16. Always composite: 14 n 9 {\displaystyle 14^{n}-9} is divisible by 5 {\displaystyle 5} when n {\displaystyle n} is odd, and it becomes a difference of squares if n {\displaystyle n} is even.
  17. Always composite: 14 n 11 {\displaystyle 14^{n}-11} is divisible by 3 {\displaystyle 3} when n {\displaystyle n} is odd and 3 {\displaystyle 3} when 5 {\displaystyle 5} is even.
  18. Always composite: 16 n 9 {\displaystyle 16^{n}-9} can be factorized.
  19. Prime: 17 9021 + 32 {\displaystyle 17^{9021}+32} is probably prime. Note that 17 n + 32 {\displaystyle 17^{n}+32} is divisible by 3 {\displaystyle 3} when n {\displaystyle n} is even, 5 {\displaystyle 5} when n 3 ( mod 4 ) {\displaystyle n\equiv 3\!\!{\pmod {4}}} , 7 {\displaystyle 7} when n 1 ( mod 6 ) {\displaystyle n\equiv 1\!\!{\pmod {6}}} , 19 {\displaystyle 19} when n 5 ( mod 9 ) {\displaystyle n\equiv 5\!\!{\pmod {9}}} , 181 {\displaystyle 181} when n 17 ( mod 36 ) {\displaystyle n\equiv 17\!\!{\pmod {36}}} , and 37 {\displaystyle 37} when n 29 ( mod 36 ) {\displaystyle n\equiv 29\!\!{\pmod {36}}} , so when there is such a prime then n 9 ( mod 12 ) {\displaystyle n\equiv 9\!\!{\pmod {12}}} .
  20. Prime: 23 1926 + 82 {\displaystyle 23^{1926}+82} is probably prime. Note that 23 n + 82 {\displaystyle 23^{n}+82} is divisible by 3 {\displaystyle 3} when n {\displaystyle n} is odd, 7 {\displaystyle 7} when n 1 ( mod 3 ) {\displaystyle n\equiv 1\!\!{\pmod {3}}} , and 13 {\displaystyle 13} when n 2 ( mod 6 ) {\displaystyle n\equiv 2\!\!{\pmod {6}}} , so when there is such a prime then n 0 ( mod 6 ) {\displaystyle n\equiv 0\!\!{\pmod {6}}} .
  21. Prime: 23 3409 112 {\displaystyle 23^{3409}-112} is probably prime. Note that 23 n 112 {\displaystyle 23^{n}-112} is divisible by 3 {\displaystyle 3} when n {\displaystyle n} is even, 5 {\displaystyle 5} when n 3 ( mod 4 ) {\displaystyle n\equiv 3\!\!{\pmod {4}}} , and 17 {\displaystyle 17} when n 13 ( mod 16 ) {\displaystyle n\equiv 13\!\!{\pmod {16}}} so when there is such a prime then n 1 , 5 , 9 ( mod 16 ) {\displaystyle n\equiv 1,5,9\!\!{\pmod {16}}} .
  22. Always composite: 24 n 9 {\displaystyle 24^{n}-9} is divisible by 5 {\displaystyle 5} when n {\displaystyle n} is odd, and it becomes a difference of squares if n {\displaystyle n} is even.
  23. Always composite: 27 n + 8 {\displaystyle 27^{n}+8} can be factorized.
  24. Always composite: 27 n 8 {\displaystyle 27^{n}-8} can be factorized.
  25. Always composite: 29 n + 4 {\displaystyle 29^{n}+4} is divisible by 3 {\displaystyle 3} when n {\displaystyle n} is odd and 5 {\displaystyle 5} when n {\displaystyle n} is even.
  26. Prime: 29 8096 + 10 {\displaystyle 29^{8096}+10} is probably prime. Note that 29 n + 10 {\displaystyle 29^{n}+10} is divisible by 3 {\displaystyle 3} when n {\displaystyle n} is odd, 13 {\displaystyle 13} when n 1 ( mod 3 ) {\displaystyle n\equiv 1\!\!{\pmod {3}}} , and 37 {\displaystyle 37} when n 2 ( mod 12 ) {\displaystyle n\equiv 2\!\!{\pmod {12}}} , so when there is such a prime then n 0 , 6 , 8 ( mod 12 ) {\displaystyle n\equiv 0,6,8\!\!{\pmod {12}}} .
  27. Always composite: 29 n + 26 {\displaystyle 29^{n}+26} is divisible by 5 {\displaystyle 5} when n {\displaystyle n} is odd and 3 {\displaystyle 3} when n {\displaystyle n} is even.
  28. Always composite: 29 n 4 {\displaystyle 29^{n}-4} is divisible by 5 {\displaystyle 5} when n {\displaystyle n} is odd, and it becomes a difference of squares if n {\displaystyle n} is even.
  29. Always composite: 29 n 26 {\displaystyle 29^{n}-26} is divisible by 3 {\displaystyle 3} when n {\displaystyle n} is odd, and it becomes a difference of squares if 5 {\displaystyle 5} is even.
  30. Always composite: 32 n + 1 {\displaystyle 32^{n}+1} can be factorized.
  31. Always composite: 32 n + 23 {\displaystyle 32^{n}+23} is divisible by 11 {\displaystyle 11} when n {\displaystyle n} is odd and 3 {\displaystyle 3} when n {\displaystyle n} is even.
  32. Always composite: 32 n 23 {\displaystyle 32^{n}-23} is divisible by 3 {\displaystyle 3} when n {\displaystyle n} is odd and 11 {\displaystyle 11} when n {\displaystyle n} is even.
  33. Unknown: 32 n 29 {\displaystyle 32^{n}-29} is divisible by 3 {\displaystyle 3} when n {\displaystyle n} is odd, 7 {\displaystyle 7} when n 0 ( mod 3 ) {\displaystyle n\equiv 0\!\!{\pmod {3}}} , 5 {\displaystyle 5} when n 2 ( mod 4 ) {\displaystyle n\equiv 2\!\!{\pmod {4}}} , and 13 {\displaystyle 13} when n 8 ( mod 12 ) {\displaystyle n\equiv 8\!\!{\pmod {12}}} , so if there is such a prime then n 4 ( mod 12 ) {\displaystyle n\equiv 4\!\!{\pmod {12}}} .
  34. Always composite: 33 n 16 {\displaystyle 33^{n}-16} is divisible by 17 {\displaystyle 17} when n {\displaystyle n} is odd, and it becomes a difference of squares if n {\displaystyle n} is even.
  35. Always composite: 34 n 29 {\displaystyle 34^{n}-29} is divisible by 5 {\displaystyle 5} when n {\displaystyle n} is odd and 7 {\displaystyle 7} when n {\displaystyle n} is even.
  36. Always composite: 36 n 25 {\displaystyle 36^{n}-25} can be factorized.
  37. Unknown: 38 n + 1 {\displaystyle 38^{n}+1} is divisible by 3 , 13 {\displaystyle 3,13} when n {\displaystyle n} is odd, 5 , 17 {\displaystyle 5,17} when n 2 ( mod 4 ) {\displaystyle n\equiv 2\!\!{\pmod {4}}} , and 41 {\displaystyle 41} when n 4 ( mod 8 ) {\displaystyle n\equiv 4\!\!{\pmod {8}}} , so if there is such a prime then n 0 ( mod 8 ) {\displaystyle n\equiv 0\!\!{\pmod {8}}} .
  38. Always composite: 38 n + 25 {\displaystyle 38^{n}+25} is divisible by 3 {\displaystyle 3} when n {\displaystyle n} is odd and 13 {\displaystyle 13} when n {\displaystyle n} is even.
  39. Unknown: 38 n + 31 {\displaystyle 38^{n}+31} is divisible by 3 {\displaystyle 3} when n {\displaystyle n} is odd, 5 {\displaystyle 5} when n 2 ( mod 4 ) {\displaystyle n\equiv 2\!\!{\pmod {4}}} , and 7 {\displaystyle 7} when n 4 ( mod 6 ) {\displaystyle n\equiv 4\!\!{\pmod {6}}} , so if there is such a prime then n 0 , 8 ( mod 12 ) {\displaystyle n\equiv 0,8\!\!{\pmod {12}}} .
  40. Always composite: 38 n 13 {\displaystyle 38^{n}-13} is divisible by 3 {\displaystyle 3} when n {\displaystyle n} is even, 5 {\displaystyle 5} when n 1 ( mod 4 ) {\displaystyle n\equiv 1\!\!{\pmod {4}}} , and 17 {\displaystyle 17} when n 3 ( mod 4 ) {\displaystyle n\equiv 3\!\!{\pmod {4}}} .
  41. Always composite: 38 n 25 {\displaystyle 38^{n}-25} is divisible by 13 {\displaystyle 13} when n {\displaystyle n} is odd, and it becomes a difference of squares if n {\displaystyle n} is even.
  42. Always composite: 39 n 4 {\displaystyle 39^{n}-4} is divisible by 5 {\displaystyle 5} when n {\displaystyle n} is odd, and it becomes a difference of squares if n {\displaystyle n} is even.
GalacticShoe (talk) 08:10, 15 September 2024 (UTC)
I'm guessing this is about the best one can do without actually discovering that some of the values are prime. I did some number crunching on the first sequence 5+788 with n<1000. All have factors less than 10000 except for n = 87, 111, 147, 207, 231, 319, 351, 387, 471, 487, 499, 531, 547, 567, 591, 639, 687, 831, 919, 979. You can add more test primes to the list, for example if n%30 = 1 then 5+788 is a multiple of 61, but nothing seems to eliminate all possible n. Wolfram Alpha says the smallest factor of 5+788 is 1231241858423, so it's probably not feasible to carry on without something more sophisticated than trial division. --RDBury (talk) 19:12, 15 September 2024 (UTC)
Thanks, RDBury. I've been using Alpertron, it's good at rapidly factorizing or finding low prime factors. GalacticShoe (talk) 22:20, 15 September 2024 (UTC)

Lines carrying rays

Not quite sure where to ask this but I decided to put it here. I apologize if this doesn't belong here.

I was recently reading about hyperbolic geometry and when reading the article Limiting parallel, I came across the statement "Distinct lines carrying limiting parallel rays do not meet." What exactly does it mean for a line to carry a ray? Is this standard mathematical terminology? TypoEater (talk) 18:14, 13 September 2024 (UTC)

Yes, this is the place for such a question, though you might also complain at Talk:Limiting parallel that the phrase is unclear. —Tamfang (talk) 22:51, 13 September 2024 (UTC)
I find the whole article unclear and confusing. Is it me?  --Lambiam 23:54, 13 September 2024 (UTC)


September 16

Geographical almost-centres and Croatia

Given the country's unusual shape, Croatia's geographical centre is rather awkwardly placed; if you Google <croatia geographical centre> you get lots of forums and similar content discussing the idea that its centre is actually outside the country, in western Bosnia and Herzegovina. From this I'm left wondering: (1) Are there any reliable sources for this claim? I couldn't find any. If so, it would be a good addition to geography of Croatia. (2) The geographical centre article discusses different methods of calculating the geographical centre of a region and the potential problems resulting therefrom. If Croatia's centre really can be defined to be in Bosnia, do all definitions put it there, or do some definitions put it in Croatia? (3) Is there any concept of most-centred-within-boundary? Let us assume that Croatia's centre is outside Croatia: is there a term that refers to the Croatian location that is least-off-centre? It wouldn't necessarily be the Croatian location closest to the centre (imagine a narrow salient that would be closest but severely off-centre), but I suppose it could. I'm thinking of the point where, if you balanced a flat map of Croatia on it, the map would topple most slowly. Obviously some points are better than others — a point at the country's southern tip would be worse than places farther northwest — so I wonder if it's reasonable to define the best place when no place is ideal. Nyttend (talk) 07:51, 16 September 2024 (UTC)

PS, imagine Croatia like a balancing bird toy. If you broke off the bird's head, you probably couldn't balance it at all, but you'd do a lot better balancing on the body (or even the tail) than at the wingtips. Croatia lacks the "bird head", but you're probably better-off balancing in the northwest than anywhere else. Nyttend (talk) 07:55, 16 September 2024 (UTC)

There was a discussion not that long ago here: Knowledge (XXG):Reference desk/Archives/Miscellaneous/2024 July 18 § Lake Lats and Longs. It contains, at least implicitly, answers to some of the questions. Since the notion of centre is not well-defined, neither is that of "least off-centre". The location nearest to a given point outside the area is on its boundary. The interior point furthest from the boundary works for most actual country shapes, including Croatia, for which this is a point roughly 20 km east of zagreb. — Preceding unsigned comment added by Lambiam (talkcontribs) 16:06, 16 September 2024 (UTC)
The visual center and algorithms to approximate the pole of inaccessibility are discussed in this 2016 Mapbox post. I thought that if you'd include just a spherical geometry of the Earth you'd get even more interesting questions, but it appears at a glance (? not sure?) the algorithm in the link already generalizes nicely to noneuclidean geometries and higher dimensions. SamuelRiv (talk) 17:46, 16 September 2024 (UTC)
Through any point on Earth there is (by the mean value theorem) a great circle that bisects the population of Croatia. Among such circles, consider the segments that cut the territory of Croatia into exactly two pieces. I propose the midpoint of the shortest such segment as a centre. (shamelessly OR) —Tamfang (talk) 01:29, 18 September 2024 (UTC)
If the border of Croatia is sufficiently fractal-like, there may be no great circle that cuts the area into just two connected pieces.  --Lambiam 09:19, 18 September 2024 (UTC)
Doesn't need to be fractal; a C-shape with overlapping ends (ie a spiral with just over a full turn) can't be halved (by area) into only two pieces by an infinite straight line. There may be a coral atoll somewhere that approaches this? 213.143.143.69 (talk) 12:37, 18 September 2024 (UTC)
There's quite a few simply connected shapes that create uncomfortable solutions for this algorithm (so far splitting 3+ pieces, you can also just have a wide lobe with two long thin tails side-by-side; the shortest area or even-population bisector straight line would have to cut through both tails; the longer unbroken line that cuts the lobe can be stopped by making the lobe an S-turn; which can only be resolved (to retain contiguity) by removing the requirement of a great circle.
(The spiral atoll example need not be a problem, since the great circle need not be required to cut through the entire atoll, but just one segment.)
It's a good idea, but it needs a bit more refinement to get a sensible-and-unique definition in all cases. SamuelRiv (talk) 16:32, 18 September 2024 (UTC)
Consider any point within the boundary. Calculate the maximum distance from that point to any other point within the boundary. Then choose the point where that maximum distance is least. This will give a 'centre' that is in some way the closest possible to the rest of the area. For convex shapes it is equivalent to the circumcentre (centre of the bounding circumcircle). Would this be unique for concave shapes? -- Verbarson  edits 11:38, 19 September 2024 (UTC)
Not necessarily; a symmetric C-shape where the ends curl back nearly to the centre would have two possible solutions, one on each tip. -- Verbarson  edits 13:27, 19 September 2024 (UTC)
1) For a practical problem like this, a finite set of 'diverse' solutions (or a continuous and symmetric set) is not really an issue -- just choose any one point; 2) you can also include the shortest path between two points within the concave polygon. A central consideration above is the calculation time.
Another possibility is to get the approximate convex skull, the largest enclosed convex polygon, which reduces you to an easy incenter calculation and you're done. SamuelRiv (talk) 18:24, 19 September 2024 (UTC)
Also, for cases like long bulbous C-shapes, we can adapt if we prefer the narrow midway 'neck' as opposed to the widest of the 'bulbs'. (To illustrate the scenario: consider North and South American -- what the cartographer calls the natural center of the supercontinent is either around the Isthmus of Panama, or it's at the geographic center of their choice of the gigantic North or South continent (or they can put the same label on both). One could find all the local extrema of the largest enclosed convex polygon at any point (assuming they are discrete sets, so the shape is not a perfect circular atoll for example, and if the approximate algorithm for the convex skull can be so adapted) and then choose the median polygon incenter (however you want to resolve it for even numbers). SamuelRiv (talk) 18:40, 19 September 2024 (UTC)


September 19

Property of a matrix

If I raise a permutation matrix to a high power it is still a permutation matrix (all values 0 or 1). If I raise a stochastic matrix to a high power it is still a stochastic matrix (all values <=1). But there are a lot of matrices raised to a high power have elements with very large values. Is there a name for the property of a matrix that when raised to a high power remain reasonably valued? RJFJR (talk) 22:12, 19 September 2024 (UTC)

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.