Talk:Summarize and say sequence: Difference between revisions

m
→‎Caching: corrected misspelling of "calcolation". -- ~~~~
(→‎Explanation request: added count-and-say instead of sort, then look and say. -- ~~~~)
m (→‎Caching: corrected misspelling of "calcolation". -- ~~~~)
Line 32:
 
==Caching==
The perl example has a note about the calcolationcalculation to a million takes a long time. For the Python solution, I took note of the comment on [http://oeis.org/A036058 the OEIS page]
:''"This kind of counting sequence is always periodic with period 1, 2 or 3"'''
And set up a ring buffer of the last three terms as a cache and also did not compute the series for starting values that had permuted digits of a starting number that had come before.<br>