The Animal and the Machine · @taatm
23 followers · 841 posts · Server mathstodon.xyz

Sorry for the delay @AndriusKulikauskas on the Peace in Ukraine podcast. I’ve been temporarily obsessed with ’s last theorem while teaching myself Python but I feel like I’ve solved that now. So on with the show!

FYI
c^n = sin(θ)a^n + sin(θ)b^n

# Python
# @taatm
, and TAATM
# Things we know
# Relationship of sides in a right angle triangle
# c**2 = a**2 + b**2
# This triangle is true but only one value of n prduces a right angle
# c**n = a**n + b**n
# The area of a triangle
# 1/2bc sin(A)
# where sides b & c are the same you can write bb or b**2
# so the area of triangle is 1/2b**2 sin(A)
# as the two sides of the triangle are the same, we can make square by adding anthoer one on top AKA doubling it
# the area of a square is therefore
# b**2sin(A)
# applying this to both sides of Pythagorus we therefore get the relationship
# n n n
# c = sin(θ)a + sin(θ)b
# And so I think Fermat, if knowing this, would conclude that Pythagous to the n can't work as thats not the relationship. Its a trick where the right angle provides a multiplier of 1.

import math

# Variables
n=4
a=3
b=4

# Pythagorus gives us c and allows a ratio
c=math.sqrt(a**2+b**2)

# the ratio can be used to find theta
known_ratio = c**n/(a**n+b**n)

theta = math.asin(known_ratio-1)
# The -1 is just to make the maths easier with arc sine and will be put back later, the true angle is function of pi

# Handy Derivatives
a2b2 = a**2+b**2
anbn = a**n+b**n
cn = c**n

print (a, b, c)
print (anbn, cn)
print (known_ratio, known_ratio * (a**n + b**n))
print (math.sin(theta) + 1, (math.sin(theta) + 1) * (anbn))
# The 1 that was taken out is added back in.
# The fun part will be finding theta from pi.

#pythagorus #fermat

Last updated 2 years ago

The Animal and the Machine · @taatm
23 followers · 841 posts · Server mathstodon.xyz

@AndriusKulikauskas to the n

Here in simple Python:

# @taatm
# Fermat, Pythagorus and TAATM
# c^n * sin(π/(2(n-1)) = a^n + b ^n
n=5
a=3
b=4
c=5

import math

triangle = (math.sin(math.pi/(2*(n-1))))

h = (5**n) * triangle
others = (a**n)+(b**n)
test = h - others

print (h)
print (others)
print (test)

#pythagorus

Last updated 2 years ago