change sieve name
This commit is contained in:
parent
6fbee468b5
commit
dd24aac8bb
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue