Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
10
Task/Juggler-sequence/Mathematica/juggler-sequence.math
Normal file
10
Task/Juggler-sequence/Mathematica/juggler-sequence.math
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
next[n_Integer] := If[EvenQ@n, Floor[Sqrt[n]], Floor[n^(3/2)]]
|
||||
|
||||
stats[n_Integer] :=
|
||||
|
||||
Block[{data = Most@NestWhileList[next, n, # > 1 &], mx},
|
||||
mx = First@Ordering[data, -1];
|
||||
{n, Length[data], data[[mx]], mx - 1}]
|
||||
|
||||
{TableForm[Table[stats@n, {n, 20, 39}],
|
||||
TableHeadings -> {None, {"n", "length", "max", "max pos"}}]
|
||||
Loading…
Add table
Add a link
Reference in a new issue