Talk:Iterated digits squaring: Difference between revisions

Line 24:
Entry 0 is set to 1, and may be used to calculate IDS(100,000,000), ignored, or deleted (if your language supports array indexing starting at 1).--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 12:23, 7 September 2014 (UTC)--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 12:23, 7 September 2014 (UTC)
===Step 2 Iterate over unique digit combinations===
Note that IDS(12345678) == IDS(21436587) and indeed any other arrangement of these digits. So we only wish to determine if each of these translate to 89 or 1 once. We can determine how many of these unique digits there are from the following table which I produced earlier using Gnumeric.
<pre>
1 10 55 220 715 2002 5005 11440
1 9 45 165 495 1287 3003 6435
1 8 36 120 330 792 1716 3432
1 7 28 84 210 462 924 1716
1 6 21 56 126 252 462 792
1 5 15 35 70 126 210 330
1 4 10 20 35 56 84 120
1 3 6 10 15 21 28 36
1 2 3 4 5 6 7 8
1 1 1 1 1 1 1 1
10 55 220 715 2002 5005 11440 24310
</pre>
From which we see that we have 24310 unique digit combinations, which is a lot less than 100 million.--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 12:33, 7 September 2014 (UTC)
===Step 2.1 Count only ones===
2,171

edits