Talk:Iterated digits squaring: Difference between revisions

Line 39:
</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)
 
Rosettacode task [[Combinations]] may help you find these 24310 unique combinations in your language, or not!!!--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 12:52, 9 September 2014 (UTC)
 
===Step 2.1 Count only ones===
Looking at the array in Step 1 we see that 90 out of 648 IDSs produce 1, so assuming this continues for larger values we shall do less work counting the 1s rather than the 89s. Square each of the digits in this combination and sum them. Use this value to index the array N from Step 1. If the value is 0 goto next Step 2.--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 12:36, 7 September 2014 (UTC)
2,172

edits