Add files via upload
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -298,10 +298,10 @@
|
|||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"text/plain": [
|
"text/plain": [
|
||||||
"['000000000000000000000000000000000000000000000000000000000000',\n",
|
"['0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',\n",
|
||||||
" '000000000000000000000000000000000000000000000000000000000001',\n",
|
" '0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001',\n",
|
||||||
" '863811000557423423230896109004106619977392256259918212890625',\n",
|
" '3953007319108169802938509890062166509580863811000557423423230896109004106619977392256259918212890625',\n",
|
||||||
" '136188999442576576769103890995893380022607743740081787109376']"
|
" '6046992680891830197061490109937833490419136188999442576576769103890995893380022607743740081787109376']"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"execution_count": 8,
|
"execution_count": 8,
|
||||||
@@ -310,31 +310,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"source": [
|
"source": [
|
||||||
"stubborn_endings(60)"
|
"stubborn_endings(100)"
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cell_type": "code",
|
|
||||||
"execution_count": 9,
|
|
||||||
"id": "73491ea5-a4c8-4221-8fc7-d6ce44d17bb4",
|
|
||||||
"metadata": {},
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"data": {
|
|
||||||
"text/plain": [
|
|
||||||
"['000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',\n",
|
|
||||||
" '000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001',\n",
|
|
||||||
" '055462996814764263903953007319108169802938509890062166509580863811000557423423230896109004106619977392256259918212890625',\n",
|
|
||||||
" '944537003185235736096046992680891830197061490109937833490419136188999442576576769103890995893380022607743740081787109376']"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"execution_count": 9,
|
|
||||||
"metadata": {},
|
|
||||||
"output_type": "execute_result"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
|
||||||
"stubborn_endings(120)"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -344,33 +320,24 @@
|
|||||||
"source": [
|
"source": [
|
||||||
"This leads to a few new questions.\n",
|
"This leads to a few new questions.\n",
|
||||||
"\n",
|
"\n",
|
||||||
"## Can each stubborn ending be extended exactly one way?\n",
|
"## Can each stubborn ending always be extended exactly one way?\n",
|
||||||
"\n",
|
"\n",
|
||||||
"We know that each stubborn ending of length *d* has to build on the endings of length *d* - 1, and so far, there has always been exactly one way (out of the ten possible digits) to extend each of the length *d* - 1 endings. Will that always be true? Might there be a case where two digits work with one of the endings, or no digits?\n",
|
"There are four stubborn endings of length 1: '0', '1', '5', and '6'. So far, every time we try, each of the four can be extended from length *d* to length *d*+1 in exactly one way. Will that always be the case? I leave it up to you to provide a proof, but I can show that it is true for every *d* up to 2000:"
|
||||||
"\n",
|
|
||||||
"I can show that for all lengths *d* up to 2000, the result of `stubborn_endings(d)` is always four strings that end with '0', '1', '5', and '6' in that order:"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 18,
|
"execution_count": 9,
|
||||||
"id": "654d53af-e58f-4ed2-874b-c4573f3a9a7a",
|
"id": "654d53af-e58f-4ed2-874b-c4573f3a9a7a",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [],
|
||||||
{
|
|
||||||
"data": {
|
|
||||||
"text/plain": [
|
|
||||||
"Counter({('0', '1', '5', '6'): 2000})"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"execution_count": 18,
|
|
||||||
"metadata": {},
|
|
||||||
"output_type": "execute_result"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"Counter(tuple(ending[-1] for ending in stubborn_endings(d))\n",
|
"def last_digits(endings) -> list[str]: \n",
|
||||||
" for d in range(1, 2001))"
|
" \"\"\"A list of the last digits of these endings.\"\"\"\n",
|
||||||
|
" return [e[-1] for e in endings]\n",
|
||||||
|
" \n",
|
||||||
|
"for d in range(1, 2000):\n",
|
||||||
|
" assert last_digits(stubborn_endings(d)) == ['0', '1', '5', '6']"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -378,8 +345,6 @@
|
|||||||
"id": "537556a3-d570-4a50-93bf-9632b40f9b47",
|
"id": "537556a3-d570-4a50-93bf-9632b40f9b47",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
"I leave it up to the reader to find a proof ofr numbers beyond 2000.\n",
|
|
||||||
"\n",
|
|
||||||
"## What digits are used to extend each ending?\n",
|
"## What digits are used to extend each ending?\n",
|
||||||
"\n",
|
"\n",
|
||||||
"I don't have a theory of which digit is used to extend each stubborn ending, but I can count:"
|
"I don't have a theory of which digit is used to extend each stubborn ending, but I can count:"
|
||||||
@@ -387,7 +352,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 11,
|
"execution_count": 10,
|
||||||
"id": "4dbd7ace-8b41-4ea7-b71f-8f7e318243e1",
|
"id": "4dbd7ace-8b41-4ea7-b71f-8f7e318243e1",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
@@ -418,7 +383,7 @@
|
|||||||
" '6': 173})}"
|
" '6': 173})}"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"execution_count": 11,
|
"execution_count": 10,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"output_type": "execute_result"
|
"output_type": "execute_result"
|
||||||
}
|
}
|
||||||
@@ -426,7 +391,7 @@
|
|||||||
"source": [
|
"source": [
|
||||||
"from collections import Counter\n",
|
"from collections import Counter\n",
|
||||||
"\n",
|
"\n",
|
||||||
"{e[-1]: Counter(e[:-1]) for e in stubborn_endings(2000)}"
|
"{end: Counter(start) for (*start, end) in stubborn_endings(2000)}"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user