Skip to content

wildducktheories/curious-factors

Repository files navigation

{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# The curious properties of $f(n,a) = \\frac{an}{n-a} = k $ for $ a,k,n \\in \\mathbb{N}$\n",
    "\n",
    "This document explores the curious properties of solutions to this equation.\n",
    "\n",
    "$\n",
    "f(n,a) = \\frac{an}{n-a} = k $ for $ a,k,n \\in \\mathbb{N}\n",
    "$\n",
    "\n",
    "# Motivation\n",
    "\n",
    "A initial motivation for investigating this function is that integer solutions of this\n",
    "equation for $a=2$ correspond to the values of n for which n-sided, regular convex polygons\n",
    "tile the plane (without gaps). In particular, the values of $n$ for which $f(n,2)$ \n",
    "is an integer are $n = \\{3, 4, 6\\}$ and it so happens that these values also enumerate the set of\n",
    "n for which regular tessellations of the plane by convex n-sided polygons exist.\n",
    "\n",
    "This turns out not to be a coincidence, as will be demonstrated below.\n",
    "\n",
    "A deeper motivation for exploring this equation is trying discover if there is a good reason why $cos(\\frac{2\\pi}{n})$ is rational only for the natural numbers $n \\in \\{3, 4, 6\\}$.\n",
    "\n",
    "Niven's theorem proves that $cos(\\frac{2\\pi}{n})$ is rational only for natural numbers $n \\inc\\{3, 4, 6\\}$ but this proof relies on the rational root theorem and isn't obviously related to geometric consideations such as regular tessellations of the plane. Yet the coincidence of $n=\\{3, 4, 6\\}$ appearing in the regular tessellation case and the rational $cos(\\frac{2\\pi}{n})$ is remarkable. \n",
    "\n",
    "Is there a more elegant way to demonstrate the rationality result which is somehow linked to geometric intuition? This document doesn't pretend to answer this later question, but perhaps we can illuminate the path towards it.\n",
    "\n",
    "# Tessellating the plane\n",
    "\n",
    "It is stated here, without proof, that an n-sided regular polygon can tesselate the plane if a polygon can be rotated\n",
    "an integer number of times about a vertex to produce an identically oriented and positioned polygon. The intuitive justification for this is that if you need a fractional number of rotations then any integer number of rotations\n",
    "will produce gaps (or overlaps) between adjacent polygons.\n",
    "\n",
    "Consider the regular, convex polygon of n-sides. To produce a gapless rotation of one edge onto another, we need\n",
    "need to rotate the edge by the interior angle that separates one edge from another.\n",
    "\n",
    "The centre angle that subtends the vertices at either end of an edge of a regular convex polygon of n-sides is $2\\pi/n$. The triangle so-formed with the edge is an isoceles triangle whose other angles are $(\\pi - 2\\pi/n)/2 = \\pi(1-2/n)/2 = \\pi(n-2)/2n$. The interior angle is twice that angle so $\\pi(n-2)/n$\n",
    "\n",
    "So, the requirement that a polygon can be rotated k times around a vertex to produce an identical polygon\n",
    "can be reduced to the statement that:\n",
    "\n",
    "$\\frac{2\\pi}{\\pi(n-2)/n} = \\frac{2n}{n-2} = k$,  for some integer, $k$\n",
    "\n",
    "However, this is simply $f(n,2) = k$, for some integer $k$ which indicates the connection to the more general equation $f(n,a)$ that is the subject of this post.\n",
    "\n",
    "# Are $n={3,4,6}$ the only solutions for a=2?\n",
    "\n",
    "It is self-evident that $f(3,2) = 6$, $f(4,2) = 4$ and $f(6,2) = 3$. Are there any other solutions?\n",
    "\n",
    "Let's first prove that if $f(n,a)=k$ for some integer $k$, then $f(k, a) = n$, so $k$ is also a solution\n",
    "\n",
    "## Lemma: $f(n,a) = k \\implies f(k,a) = n$\n",
    "\n",
    "So, let us substitute $k$ into $f(k,a)$\n",
    "\n",
    "$\n",
    "f(k, a) = \\frac{ak}{k-2}\n",
    "$\n",
    "\n",
    "Now let's substiute an expression for k in terms of n into the above:\n",
    "\n",
    "$\n",
    "f(k, a) = \\frac{a\\frac{an}{n-a}}{\\frac{an}{n-a}-a} = \\frac{a^2n}{a^2} = n\n",
    "$\n",
    "\n",
    "But also note:\n",
    "\n",
    "$\n",
    "f(k, a) = f(f(n, a), a)\n",
    "$\n",
    "\n",
    "So:\n",
    "\n",
    "$\n",
    "f(f(n, a), a) = n\n",
    "$\n",
    "\n",
    "\n",
    "# Proof: $n=\\{3,4,6\\}$ are the only integer solutions, for a=2\n",
    "\n",
    "n=1, is not a solution since 2/(1-2) is less than zero.\n",
    "\n",
    "n=2, is not a solution since 4/0 is undefined.\n",
    "\n",
    "n=5, it not a solution since 10/5-2 is rational, but not an integer.\n",
    "\n",
    "Now, suppose there exists a solution n > 6, then:\n",
    "\n",
    "$f(n,2) = \\frac{2n}{n-2} = g$ is also a solution by the lemma above. \n",
    "\n",
    "This means $f(g,2)= n$\n",
    "\n",
    "However, we have said that $n > 6$, therefore:\n",
    "\n",
    "$\\frac{2g}{g-2} > 6$\n",
    "\n",
    "Rearranging, we have:\n",
    "\n",
    "$2g > 6g-12 \\implies 12 > 4g \\implies g < 3$\n",
    "\n",
    "but we have already proved there are no solutions with $g < 3$, so there can be no solution for n > 6. Hence $\\{3,4,6\\}$ are the only solutions.\n",
    "\n",
    "# Finding all solutions to $f(n,a) = k$ for all a.\n",
    "\n",
    "If one counts all the integer solutions $(n, k)$ of $f(n, a)=k$ for $a < 100$, one discovers that the number of solutions for $a$ is exactly $d(a^2)$, where $d(k)$ denotes the number of factors of $k$.\n",
    "\n",
    "If true in general, this would imply a one-to-one correspondence between the factors of $a^2$ and the solutions of $f(n,a) = k$. For the a=2, case this would imply a correspondence between $\\{1,2,4\\}$ and $\\{3,4,6\\}$.\n",
    "\n",
    "Since each elements of these two sets differ by exactly 2, or a, it appears reasonable to presume that the\n",
    "correspondence is as follows. If $p$ is a factor of $a^2$, then $p+a$ is a solution of $f(p+a,a) = k$, for some k.\n",
    "\n",
    "$\n",
    "f(p+a, a) = \\frac{a*(p+a)}{p+a-a} = \\frac{pa + a^2}{p} = a+\\frac{a^2}{p}\n",
    "$\n",
    "\n",
    "But we know that $p$ divides ${a^2}$ so $q = \\frac{a^2}{p}$ is $p$'s complemetary factor of $a^2$ and hence must be an integer.\n",
    "\n",
    "In other words:\n",
    "\n",
    "$\n",
    "f(p+a,a) = q+a\n",
    "$\n",
    "\n",
    "And by the lemma above:\n",
    "\n",
    "$\n",
    "f(q+a,a) = p+a\n",
    "$\n",
    "\n",
    "In other words, the ordered pairs (p,q) corresponding to the complementary factors of $a^2$, generate the solutions (n,k) to $f(n,a) = k$, with $n=p+a$, $k=q+a$, $a^2=pq$.\n",
    "\n",
    "To prove that there are no solutions beyond those derived from factors of $a^2$, consider the case where $p$ is not a factor of $a^2$. By definition, $p$ would not divide $a^2$ which means the RHS of $f(p+a,a) = a+\\frac{a^2}{p}$ would not be an integer and thus not a solution. \n",
    "\n",
    "Therefore, the only solutions (n,k) for $f(n,a) = k$ are all of form $(p+a,q+a)$ where $pq=a^2$\n",
    "\n",
    "# Equivalence of $\\frac{1}{a} = \\frac{1}{n} + \\frac{1}{k} = $ to $\\frac{an}{n-a} = k$\n",
    "\n",
    "A slightly more straight forward way to express the question $\\frac{an}{n-a} = k$ is to express it as $\\frac{1}{a} = \\frac{1}{n} + \\frac{1}{k}$\n",
    "\n",
    "Let us show that by starting with:\n",
    "\n",
    "$\\frac{an}{n-a} = k$\n",
    "\n",
    "and invert both sides:\n",
    "\n",
    "$\\frac{n-a}{an} = \\frac{1}{k}$\n",
    "\n",
    "Simplifying the LHS:\n",
    "\n",
    "$\\frac{1}{a} - \\frac{1}{n} = \\frac{1}{k}$\n",
    "\n",
    "Redistributing:\n",
    "\n",
    "$\\frac{1}{a} = \\frac{1}{n} + \\frac{1}{k}$\n",
    "\n",
    "# Let's Get Complex\n",
    "\n",
    "If we relax the requirement that a, k, n are integers we get some interesting results.\n",
    "\n",
    "Let's see what happen if we set $a=i$ or, equivalently, $a=e^{\\frac{\\pi}{2}i}$\n",
    "\n",
    "The equation then becomes:\n",
    "\n",
    "$\n",
    "\\frac{ni}{n-i} = k\n",
    "$\n",
    "\n",
    "If the solution above holds, then the solutions are n=p+i, k=q+i for all p,q such that $a^2 = pq$\n",
    "\n",
    "But what is $a^2$? $a^2 = i^2 = -1$.\n",
    " \n",
    "Huh? What are the factors of -1? They are the complex unit vectors whose\n",
    "arguments add to $\\pi$ because $e^{\\pi{i}} = -1$\n",
    "\n",
    "$-1 = e^{\\pi{i}} = e^{\\pi{ri}}e^{\\pi{(1-r) i}} = e^{\\pi(r+(1-r))i}$ for $0 <= r <= 1$\n",
    "\n",
    "So, let's assume that $n = i + e^{\\pi{ri}}$, for some $r, 0 <= r <= 1$ so satisfies $\\frac{ni}{n-i} = k$> If true, we would expect that $k = i + e^{\\pi{(1-r)i}}$.\n",
    "\n",
    "Let's show that is true:\n",
    "\n",
    "$\n",
    "\\frac{an}{n-a} = \\frac{ni}{n-i} = \\frac{i(i+e^{\\pi{ri}})}{i+e^{\\pi{ri}} - i}\n",
    "= \\frac{i(i+e^{\\pi{ri}})}{e^{\\pi{ri}}} = i^2{e^{-\\pi{ri}}}+i = e^{\\pi{i}}e^{-\\pi{ri}} + i = e^{\\pi{(1-r)i}} + i = k\n",
    "$\n",
    "\n",
    "...to be continued..."
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}

About

An exploration of equation f(n,a) = an/(n-a) = k

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published