Talk:Self numbers: Difference between revisions

Content added Content deleted
(→‎Go, tweaked: Further comment.)
Line 9: Line 9:
Now counting all selfnumbers 0..9999 than copy 10000- (max digitcount)*9 to Position 0..- (max digitcount)*9 and clear the rest to the upper limit.
Now counting all selfnumbers 0..9999 than copy 10000- (max digitcount)*9 to Position 0..- (max digitcount)*9 and clear the rest to the upper limit.
This can all be done lightning fast in Level I cache. [[user Horst.h|Horst.h]] 18:20, 7 October 2020 (UTC)
This can all be done lightning fast in Level I cache. [[user Horst.h|Horst.h]] 18:20, 7 October 2020 (UTC)
:Wrong idea[[user:Horsth|Horsth]] [[User:Horsth|Horsth]] ([[User talk:Horsth|talk]]) 05:02, 8 October 2020 (UTC)
:I tought about one more time, because the CountOfSelfnumbers(n)/n ist nearly constant .<BR>
:I mark once every follower of a number by adding its sum of digits in a range of 0..9999+(max digitcount)*9.<BR>
:My window size is 0..9999.<Br>
:For the first time I count the elements 0..9999<BR>
:The next time I move the start of the window by one, the sum of digit in front of the four digits, for the range 10000..19999.<BR>
:Than I move the start of the window by 2, the sum of digit in front of the four digits, for the range 20000..29999.<BR>
:....<BR>
:..by 72 ( 8*9) for 99999999_0000 to 99999999_9999<BR>
:Now I think, i memorize the sum of self numbers (x..x+9999) at the Position 0..72, so only one time of counting is needed<Br>
:Using the array SumOfDigits 0..9999 i can do it for that elemnents too<BR>
:Is it that simple? [[user:Horsth|Horsth]] [[User:Horsth|Horsth]] ([[User talk:Horsth|talk]]) 05:02, 8 October 2020 (UTC)


== Go, tweaked ==
== Go, tweaked ==