Talk:Iterated digits squaring: Difference between revisions

Content added Content deleted
Line 42: Line 42:
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)
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===
====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)
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)