This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am peteketcham on github. | |
* I am peteketcham (https://keybase.io/peteketcham) on keybase. | |
* I have a public key whose fingerprint is 2D4B A379 BC61 A7A7 4215 703E 4B42 171A F8C4 CAD9 | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
Project Euler, Problem 596 | |
https://projecteuler.net/problem=596 | |
Let be T(r) the number of integer quadruplets x, y, z, t such that x**2 + y**2 + z**2 + t**2 ≤ r**2. | |
In other words, T(r) is the number of lattice points in the four-dimensional hyperball of radius r. | |
You are given that T(2) = 89, T(5) = 3121, T(100) = 493490641 and T(10**4) = 49348022079085897. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
Project Euler, Problem 596 | |
https://projecteuler.net/problem=596 | |
Let be T(r) the number of integer quadruplets x, y, z, t such that x**2 + y**2 + z**2 + t**2 ≤ r**2. | |
In other words, T(r) is the number of lattice points in the four-dimensional hyperball of radius r. | |
You are given that T(2) = 89, T(5) = 3121, T(100) = 493490641 and T(10**4) = 49348022079085897. |