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
where φ = rac{1 + sqrt{5}}{2} (note that this number is the Golden Ratio). While many people are familiar with the Fibonacci sequence (0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, etc., where each number is the sum of the previous two numbers), few know there is a formula to figure out any given Fibonacci number: the formula that we have above, where F(n) is the nth Fibonacci number. That is, to find the 100th Fibonacci number, you don’t have to calculate the first 99 numbers. You can just throw 100 into the formula.
> The Explicit Formula for the Fibonacci SequenceIt is through science that we prove, but through intuition that we discover.
Henri Poincaré