21y/o Computer science student with interests in fields like Cybersecurity, Quantum Computing, and Mathematics.
// Fermat's last problem x^n+y^n=z^n
#!/usr/bin/perl
use strict;
use warnings;
sub fermat {
my ($n) = @_;
for (my $x = 0; $x < 100; $x++) {
for (my $y = 0; $y < $x+1; $y++) {
for (my $z = 0; $z < ($x**$n)+($y**$n) +1; $z++) {
if (($x**$n)+($y**$n) == ($z**$n)) {
print "$x^$n + $y^$n == $z^$n\n";
}
}
}
}
my $e = fermat(5);
- 🔭 Bachelor's degree in Computer Science and Mathematics
- 🌱 I’m currently learning Number Theory
- ⚙️ Mastering:
.py
,.cpp
,.c
,.perl
,.java
,.html
,.css
.s
,.sh
,.go
This equation says that if you take the reciprocal of all the square numbers, and then add them all together, you get pi squared over six. This was proved by Euler. Notice that this sum is just the function on the left hand side of Equation 2 (the Euler product formula) earlier in this post, with s = 2. That formula is the Riemann zeta function, we can say that zeta of 2 is pi squared over six.
> The Basel ProblemGreat ideas often receive violent opposition from mediocre minds.
Albert Einstein