2 hours ago · Science · 0 comments

The nth pentagonal number Pn is the number of dots in diagrams like those below with n concentric pentagons. We have the formula Pn = (3n² − n)/2 where n is a positive integer. If n is an integer but not positive, the equation above defines a generalized pentagonal number. If you’re given an n, you can easily compute Pn. But suppose you’re given a large number x. How would you determine if it is a pentagonal number? And if it is a pentagonal number, how would you find n such that x = Pn? If x = Pn = (3n² − n)/2 then we can solve a quadratic equation for n: n = (1 ± √(24x + 1))/6. If 24x + 1 is not a perfect square, n is not an integer and x is not a pentagonal number, ordinary or generalized. For example, √(24 × 20260615 + 1)) = 22051.185… and so 20260615 is not a pentagonal number nor a generalized pentagonal number. Now suppose x = 170141183460469231731687303715884105727. Is this a pentagonal number? You can’t just compute √(24x + 1) in floating point arithmetic because the result…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.