Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,48 @@
on juggler(n)
script o
property sequence : {n}
end script
set i to 1
set {max, pos} to {n, i}
repeat until (n = 1)
set n to n ^ (n mod 2 + 0.5) div 1
set end of o's sequence to n
set i to i + 1
if (n > max) then set {max, pos} to {n, i}
end repeat
return {n:n, sequence:o's sequence, |length|:i, max:max, maxPos:pos}
end juggler
on intToText(n)
if (n < 2 ^ 29) then return n as integer as text
set lst to {n mod 10 as integer}
set n to n div 10
repeat until (n = 0)
set beginning of lst to n mod 10 as integer
set n to n div 10
end repeat
return join(lst, "")
end intToText
on join(lst, delim)
set astid to AppleScript's text item delimiters
set AppleScript's text item delimiters to delim
set txt to lst as text
set AppleScript's text item delimiters to astid
return txt
end join
on task()
set output to {}
repeat with n from 20 to 39
set {|length|:len, max:max, maxPos:pos} to juggler(n)
set end of output to join({n, ": l[n] = ", len - 1, ", h[n] = ", intToText(max), ", i[n] = ", pos - 1}, "")
end repeat
return join(output, linefeed)
end task
task()

View file

@ -0,0 +1,20 @@
"20: l[n] = 3, h[n] = 20, i[n] = 0
21: l[n] = 9, h[n] = 140, i[n] = 4
22: l[n] = 3, h[n] = 22, i[n] = 0
23: l[n] = 9, h[n] = 110, i[n] = 1
24: l[n] = 3, h[n] = 24, i[n] = 0
25: l[n] = 11, h[n] = 52214, i[n] = 3
26: l[n] = 6, h[n] = 36, i[n] = 3
27: l[n] = 6, h[n] = 140, i[n] = 1
28: l[n] = 6, h[n] = 36, i[n] = 3
29: l[n] = 9, h[n] = 156, i[n] = 1
30: l[n] = 6, h[n] = 36, i[n] = 3
31: l[n] = 6, h[n] = 172, i[n] = 1
32: l[n] = 6, h[n] = 36, i[n] = 3
33: l[n] = 8, h[n] = 2598, i[n] = 2
34: l[n] = 6, h[n] = 36, i[n] = 3
35: l[n] = 8, h[n] = 2978, i[n] = 2
36: l[n] = 3, h[n] = 36, i[n] = 0
37: l[n] = 17, h[n] = 24906114455136, i[n] = 8
38: l[n] = 3, h[n] = 38, i[n] = 0
39: l[n] = 14, h[n] = 233046, i[n] = 3"

View file

@ -0,0 +1,24 @@
do shell script "echo '
define juggler(n) {
#auto temp,i,max,pos
#scale = 0;
temp = n; i = 0; max = n; pos = i;
while (temp > 1) {
i = i + 1; temp = sqrt(temp ^ (1 + (temp % 2 * 2)));
if (temp > max) { max = temp; pos = i; }
}
if (n < 40) {
print n,\": l[n] = \",i,\", h[n] = \",max, \", i[n] = \",pos,\"\\n\";
} else {
print n,\": l[n] = \",i,\", d[n] = \",length(max), \", i[n] = \",pos,\"\\n\";
}
return;
}
for (n = 20 ; n < 40 ; n++) { juggler(n); }
print \"\\n\";
juggler(113); juggler(173); juggler(193); juggler(2183); juggler(11229); juggler(15065);
juggler(15845); # 91 seconds so far.
juggler(30817); # Another 191 to here.
# juggler(48443) produced no result after running all night.
' | bc | sed -n '/^0$/ !p;'"

View file

@ -0,0 +1,29 @@
"20: l[n] = 3, h[n] = 20, i[n] = 0
21: l[n] = 9, h[n] = 140, i[n] = 4
22: l[n] = 3, h[n] = 22, i[n] = 0
23: l[n] = 9, h[n] = 110, i[n] = 1
24: l[n] = 3, h[n] = 24, i[n] = 0
25: l[n] = 11, h[n] = 52214, i[n] = 3
26: l[n] = 6, h[n] = 36, i[n] = 3
27: l[n] = 6, h[n] = 140, i[n] = 1
28: l[n] = 6, h[n] = 36, i[n] = 3
29: l[n] = 9, h[n] = 156, i[n] = 1
30: l[n] = 6, h[n] = 36, i[n] = 3
31: l[n] = 6, h[n] = 172, i[n] = 1
32: l[n] = 6, h[n] = 36, i[n] = 3
33: l[n] = 8, h[n] = 2598, i[n] = 2
34: l[n] = 6, h[n] = 36, i[n] = 3
35: l[n] = 8, h[n] = 2978, i[n] = 2
36: l[n] = 3, h[n] = 36, i[n] = 0
37: l[n] = 17, h[n] = 24906114455136, i[n] = 8
38: l[n] = 3, h[n] = 38, i[n] = 0
39: l[n] = 14, h[n] = 233046, i[n] = 3
113: l[n] = 16, d[n] = 27, i[n] = 9
173: l[n] = 32, d[n] = 82, i[n] = 17
193: l[n] = 73, d[n] = 271, i[n] = 47
2183: l[n] = 72, d[n] = 5929, i[n] = 32
11229: l[n] = 101, d[n] = 8201, i[n] = 54
15065: l[n] = 66, d[n] = 11723, i[n] = 25
15845: l[n] = 139, d[n] = 23889, i[n] = 43
30817: l[n] = 93, d[n] = 45391, i[n] = 39"