change sieve name

This commit is contained in:
filifa 2025-07-20 20:00:42 -04:00
parent 6fbee468b5
commit dd24aac8bb
1 changed files with 2 additions and 2 deletions

View File

@ -42,7 +42,7 @@
"metadata": {},
"outputs": [],
"source": [
"def totients(limit):\n",
"def totient_sieve(limit):\n",
" totients = [n - 1 for n in range(0, limit)]\n",
" totients[0] = 0\n",
" totients[1] = 1\n",
@ -78,7 +78,7 @@
"answer = None\n",
"ratio = float('inf')\n",
"\n",
"for (n, totient) in enumerate(totients(limit)):\n",
"for (n, totient) in enumerate(totient_sieve(limit)):\n",
" if n == 0 or n == 1 or totient == n - 1:\n",
" continue\n",
" \n",