Wikipedia:Reference desk/Archives/Mathematics/2023 August 30

= August 30 =

Intersection of figurate numbers
Consider these twelve set of figurate numbers:


 * 1) Triangle:
 * 2) Square:
 * 3) Pentagon:
 * 4) Hexagon:
 * 5) Triangular prism:
 * 6) Square prism:
 * 7) Pentagonal prism:
 * 8) Hexagonal prism:
 * 9) Triangular pyramid:
 * 10) Square pyramid:
 * 11) Pentagonal pyramid:
 * 12) Hexagonal pyramid:

The intersection of any two 2D shape (i.e. triangle, square, pentagonal, or hexagonal) is infinite, but the intersection of a 2D shape and a 3D shape is finite (except the case of square and square prism, which are infinite 6th powers), and the intersection of any two 3D shape is empty (except the case of triangular prism and pentagonal pyramid, which are the same)? 36.234.122.74 (talk) 17:52, 30 August 2023 (UTC)


 * I see a question mark, but that doesn't look like a question. Besides that looks like a homework or quizz. Dhrm77 (talk) 19:08, 30 August 2023 (UTC)
 * These are not homeworks, e.g. both “square” and “triangular pyramid” has only two solutions: 4 and 19600, and both “square” and “square pyramid” has only one solution: 4900, but what are the answers of other combinations? 36.234.122.74 (talk) 13:21, 31 August 2023 (UTC)
 * When both are 2 dimensional, this amounts to a quadratic Diophantine equation of the form am2+bm+c=dn2+en+f. Assuming a and d are not 0 and their ratio is not a square, then some algebraic manipulation can reduce this to the generalized Pell's equation. The upshot is if there are any solutions at all, and we know there are because all the sequences start 0, 1, ..., there are an infinite number of solutions and these can be generated recursively. For the case of triangular hexagonal numbers the ratio of a to d is a square and things work out a bit differently. In fact all hexagonal numbers are also triangular numbers. (This material could all be covered in an undergraduate level number theory course and it's conceivable that the corresponding problems could be assigned as homework. Things get much, much more difficult if you want the intersection of three quadratic sequences, for example are there any triangular, square, pentagonal numbers other than 0 and 1?) The case where one or both of the sequences is cubic is more difficult and as far as I know there's no general method to solve such problems. I looked specifically at triangular tetrahedral numbers (a triangular pyramid is usually called a tetrahedron). These are given in , which lists 6 of them, a surprising number given it's finite. I gather that the list is complete was proved by E. T. Avanesov in the 1960's, and his proof can be found here. It's in Russian though, and I don't read Russian, so I have no idea what kind of heavy machinery was brought in to solve the problem. I imagine that the situation is similar with the other combinations; either there is some trivial identity which applies and there is an infinite number, or the problem is difficult enough that the solution requires research paper using some rather advanced number theory. --RDBury (talk) 18:38, 31 August 2023 (UTC)


 * For what it's worth, there are no square decagonal numbers other than 0 and 1. They would be solutions to m2 = 4n2 - 3n. Multiply both sides by 16 and complete the square to get (4m)2 = (8n-3)2-9 or (8n-3)2-(4m)2=9. Factor, (8n-3+4m)(8n-3-4m)=9. That give only 6 possibilities:
 * 8n-3+4m=1, 8n-3-4m=9
 * 8n-3+4m=3, 8n-3-4m=3
 * 8n-3+4m=9, 8n-3-4m=1
 * 8n-3+4m=-1, 8n-3-4m=-9
 * 8n-3+4m=-3, 8n-3-4m=-3
 * 8n-3+4m=-9, 8n-3-4m=-1
 * Solving the systems of linear equations you get n=1, m=-1; n=3/4, m=0; n=1, m=1; n=-1/4, m=1; n=0, m=0; n=-1/4, m=-1. Eliminate the non-integer solutions to get m=±1, n=1, m2 = 4n2 - 3n = 1; m=0, n=0, m2 = 4n2 - 3n = 0. --RDBury (talk) 20:04, 2 September 2023 (UTC)
 * How about 2D and 3D, I saw your references:
 * Triangle and triangular pyramid: 1, 10, 120, 1540, 7140
 * Triangle and square pyramid: 1, 55, 91, 208335 (possible not complete?)
 * Square and triangular pyramid: 1, 4, 19600
 * Square and square pyramid: 1, 4900
 * But how about triangle and square prism? Are there any other cube triangular numbers other than 0 and 1? Also, how about triangle and triangular prism? How about square and triangular prism? (For square and square prism, it is trivial that there are infinitely many solutions, they are exactly the 6th powers) 36.234.122.6 (talk) 06:17, 3 September 2023 (UTC)
 * Finkelstein and London proved in 1972 that the only triangular/square pyramidal numbers are the four listed above. The OEIS sequence has the paper in its references.
 * The only numbers that are triangular and cubic are 0 and 1. This is because you can rewrite $$n(n+1)/2=m^{3}$$ as $$(2n+1)^{2} - (2m)^{3} = 1$$, and by Mihăilescu's theorem, the only solutions are $$n = 0, m = 0$$ and $$n = 1, m = 1$$.
 * Numbers that are both triangle and triangular prism are given in . No source is given for whether the list is finite or not.
 * Numbers that are both square and triangular prisms are given in, and it's pretty clear that the $$n$$-th triangular prism is a square if and only if $$(n+1)/2$$ is itself square. GalacticShoe (talk) 18:29, 6 September 2023 (UTC)
 * Another question: Can triangular numbers be perfect powers $$m^r$$ with $$r>2$$? 210.66.228.168 (talk) 15:10, 7 September 2023 (UTC)
 * I cannot read Russian either and thus cannot give insight into the mechanisms used in the proof, but transcribing the last sentence into Google Translate yields: "Кроме чисел 1, 10, 120, 1540 и 7140, не сущестедет других тетраэдральных чисел яеляющихся одноеременно треугольными числами." This apparently translates to "Apart from the numbers 1, 10, 120, 1540 and 7140, there are no other tetrahedral numbers that are also triangular numbers." Assuming the proof is valid, which it most likely is, this would suggest that the list is indeed complete. GalacticShoe (talk) 15:40, 4 September 2023 (UTC)
 * There are many properties shared by members of the intersections of 2D sequences with 3D sequences. There are probably elliptic curve properties/techniques that can be used to evaluate whether there are infinitely many solutions or not, but I'm certainly not the person to do it.
 * If the $$n$$-th triangular number is the $$m$$-th triangular prism, then $$x = 3m + 1$$ and $$y = 2n+1$$ satisfies $$27y^{2} = 4x^{3} - 12x + 35$$.
 * If the $$n$$-th triangular number is the $$m$$-th pentagonal prism, then $$x = 9m - 1$$ and $$y = 2n+1$$ satisfies $$243y^{2} = 4x^{3} - 12x + 235$$.
 * If the $$n$$-th triangular number is the $$m$$-th hexagonal prism, then $$x = 6m - 1$$ and $$y = 2n+1$$ satisfies $$27y^{2} = 2x^{3} - 6x + 23$$.
 * If the $$n$$-th triangular number is the $$m$$-th hexagonal pyramid, then $$x = 4m + 1$$ and $$y = 2n+1$$ satisfies $$12y^{2} = x^{3} - 7x + 18$$.
 * If the $$n$$-th square number is the $$m$$-th hexagonal pyramid, then $$x = 4m + 1$$ and $$y = n$$ satisfies $$96y^{2} = x^{3} - 7x + 6$$.
 * If the $$n$$-th pentagonal number is the $$m$$-th cube, then $$x = m$$ and $$y = 6n-1$$ satisfies $$y^{2} = 24x^{3} + 1$$.
 * GalacticShoe (talk) 19:38, 6 September 2023 (UTC)
 * With intersections of 3D sequences with other 3D sequences naturally you start to have relations between cubics, which are probably harder to evaluate. For example:
 * If the $$n$$-th triangular prism is the $$m$$-th cube, then $$x = 3n + 1$$ and $$y = m$$ satisfies $$54y^{3} = x^{3} - 3x + 2$$. GalacticShoe (talk) 20:48, 6 September 2023 (UTC)
 * I consider to add rectangle $$n \cdot (n+1)$$ and rectangular cuboid $$n \cdot (n+1) \cdot (n+2)$$, although this seems to be unofficial. 210.66.228.168 (talk) 15:32, 7 September 2023 (UTC)
 * Also, I noted that the "triangular prism numbers" and the "pentagonal pyramid numbers" are completely the same, is this a coincidence? Also, are there other m,n such that the "m-gonal prism numbers" and the "n-gonal pyramid numbers" are completely the same? 36.234.121.52 (talk) 00:23, 9 September 2023 (UTC)
 * The $$k$$-th $$m$$-gonal prism number is $$\frac{m-2}{2}k^{3} - \frac{m-4}{2}k^{2}$$. The $$k$$-th $$n$$-gonal pyramidal number is $$\frac{n-2}{6}k^{3} + \frac{1}{2}k^{2} + \frac{5-n}{6}k$$. Because of the linear term, the only time the two terms perfectly align is when $$n = 5$$ and $$m = 3$$. GalacticShoe (talk) 01:38, 9 September 2023 (UTC)
 * So the status is?


 * (1) 0, 1, 36, 1225, 41616, 1413721, 48024900, 1631432881, 55420693056, 1882672131025, 63955431761796, 2172602007770041, 73804512832419600, 2507180834294496361, 85170343853180456676, …
 * (2) 0, 1, 6, 4851
 * (3) 0, 1, 196, 2601, 15376, 60025, 181476, 461041, 1032256, 2099601, 3960100, 7027801, 11861136, 19193161, 29964676, 45360225, 66846976, 96216481, 135629316, 187662601, 255360400, …
 * (4) 0, 1
 * (5) 0, 1, 64, 729, 4096, 15625, 46656, 117649, 262144, 531441, 1000000, 1771561, 2985984, 4826809, 7529536, 11390625, 16777216, 24137569, 34012224, 47045881, 64000000, …
 * (6) 0, 1, ?
 * (7) 0, 1, 10, 120, 1540, 7140
 * (8) 0, 1, 4, 19600
 * (9) 0, 1, ?
 * (10) 0, 1, ?
 * (11) 0, 1, 55, 91, 208335
 * (12) 0, 1, 4900
 * (13) 0, 1, ?
 * (14) 0, 1, ?
 * (15) 0, 1, ?

—— 210.66.228.168 (talk) 15:06, 7 September 2023 (UTC)


 * And only the intersections (1) (3) (5) have infinitely many numbers? 210.66.228.168 (talk) 15:16, 7 September 2023 (UTC)
 * So far yes, this is the status of what seems to be known purely based off of a direct comparison of the sequences. Whether or not the apparently finite sequences are truly finite will have to be found by finding solutions to the aforementioned cubic equations. GalacticShoe (talk) 16:22, 7 September 2023 (UTC)
 * I have to agree. I find no more solutions for any of the short sequences (among the 15 listed above) under 4*10^18. Dhrm77 (talk) 11:03, 8 September 2023 (UTC)

How many ways to put m balls to n boxes?
In these conditions, how many ways to put m balls to n boxes?

36.234.122.74 (talk) 17:55, 30 August 2023 (UTC)
 * 1) Balls are the same, boxes are the same, each box can have any number (include 0) of balls.
 * 2) Balls are the same, boxes are different, each box can have any number (include 0) of balls.
 * 3) Balls are different, boxes are the same, each box can have any number (include 0) of balls.
 * 4) Balls are different, boxes are different, each box can have any number (include 0) of balls.
 * 5) Balls are the same, boxes are the same, each box must have <= 1 ball (m <= n).
 * 6) Balls are the same, boxes are different, each box must have <= 1 ball (m <= n).
 * 7) Balls are different, boxes are the same, each box must have <= 1 ball (m <= n).
 * 8) Balls are different, boxes are different, each box must have <= 1 ball (m <= n).
 * 9) Balls are the same, boxes are the same, each box must have >= 1 ball (m >= n).
 * 10) Balls are the same, boxes are different, each box must have >= 1 ball (m >= n).
 * 11) Balls are different, boxes are the same, each box must have >= 1 ball (m >= n).
 * 12) Balls are different, boxes are different, each box must have >= 1 ball (m >= n).
 * Broadly speaking, these sorts of questions fall into the realm of combinatorics, specifically that of Enumerative combinatorics. -- Jayron 32 18:02, 30 August 2023 (UTC)
 * WP shouldn't be used to answer homework or quiz questions. Dhrm77 (talk) 19:09, 30 August 2023 (UTC)
 * This appears to be the Twelvefold way and you can find formulas there. Maybe read the article first and come back if you need clarification. Per the guidelines above, we don't do homework for you, but we will try to help if you're stuck on a specific point. --RDBury (talk) 06:57, 31 August 2023 (UTC)
 * This is not homework, they are just my research, e.g. the answer of question 8 is P(m,n) = m!/(m-n)!, but what are the answer of other 11 questions? Can we also find the formula of other 11 questions? 36.234.122.74 (talk) 13:19, 31 August 2023 (UTC)
 * The formulas are in the twelvefold-way article; go to the table in section and click on the links.  --Lambiam 17:14, 31 August 2023 (UTC)