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
Here is the significance of this equation, in English:
Prime numbers are numbers that have no divisors other than 1 and themselves. The primes below 100 are 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97. From this, it is already clear that there is no apparent pattern to the primes: in some runs of numbers you will get a lot of primes, in other runs you will find no primes, and whether a run has a lot of primes or no primes seems to be totally at random.
For a very long time, mathematicians have been trying to find a pattern to the prime numbers. The equation above is an explicit function for the number of primes less than or equal to a given number.</p>
Imagination is more important than knowledge. For while knowledge defines all we currently know and understand, imagination points to all we might yet discover and create.
Albert Einstein