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 is somewhat unintuitive, because it says that if you add a bunch of numbers that keep getting smaller (and eventually become zero), they still reach infinity. Yet if you square all the numbers, it doesn’t add up to infinity (it adds up to pi squared over six). The harmonic series, if you look carefully, is actually just zeta of 1.
> The Harmonic SeriesIf you can't explain it simply, you don't understand it well enough.
Albert Einstein