Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
9
Task/Hailstone-sequence/Maple/hailstone-sequence-3.maple
Normal file
9
Task/Hailstone-sequence/Maple/hailstone-sequence-3.maple
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
longest := 0; n := 0;
|
||||
for i from 1 to 100000 do
|
||||
len := numelems(hailstone(i));
|
||||
if len > longest then
|
||||
longest := len;
|
||||
n := i;
|
||||
end if;
|
||||
od:
|
||||
printf("The longest Hailstone sequence in the first 100k is n=%d, with %d terms\n",n,longest);
|
||||
Loading…
Add table
Add a link
Reference in a new issue