tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 deletions
|
|
@ -0,0 +1,6 @@
|
|||
selfRefSequence[ x_ ] := FromDigits@Flatten@Reverse@Cases[Transpose@{RotateRight[DigitCount@x,1], Range[0,9]},Except[{0,_}]]
|
||||
DisplaySequence[ x_ ] := NestWhileList[selfRefSequence,x,UnsameQ[##]&,4]
|
||||
data= {#, Length@DisplaySequence[#]}&/@Range[1000000];
|
||||
Print["Values: ", Select[data ,#[[2]] == Max@data[[;;,2]]&][[1,;;]]]
|
||||
Print["Iterations: ", Length@DisplaySequence[#]&/@Select[data ,#[[2]] == Max@data[[;;,2]]&][[1,;;]]]
|
||||
DisplaySequence@Select[data, #[[2]] == Max@data[[;;,2]]&][[1]]//Column
|
||||
Loading…
Add table
Add a link
Reference in a new issue