-
Notifications
You must be signed in to change notification settings - Fork 300
Add polygonal numbers and polygonal roots functions #1688
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Hi, I've run clang-format and found that the code formatting is good. Thanks for fixing the formatting. |
I have separated the numeric calculation from the symbolic in this PR. For this particular PR it is a minor thing, but I think for other number theoretic functions that are slow and difficult to calculate numerically similar separations would come with a number of benefits:
|
This is ready for review |
What's the name that sympy use? I can't find it in sympy |
It is not available in sympy as far as I know. It is in mathematica though (except for the root). See the links above. |
Thanks. Can you add these links in the code comments as well? |
Sure! Good point. |
Sorry, did a bad merge. |
Should be good now. Fixed bad merge and squashed commits. Also added function documentation with the references above. |
Mathematica has PolygonalNumber: https://reference.wolfram.com/language/ref/PolygonalNumber.html
The polygonal root is the inverse: http://oeis.org/wiki/Polygonal_numbers#Polygonal_roots