19 lines
432 B
Plaintext
19 lines
432 B
Plaintext
F fusc(n)
|
||
V res = [0] * n
|
||
res[1] = 1
|
||
L(i) 2 .< n
|
||
res[i] = I i % 2 == 0 {res[i I/ 2]} E res[(i-1) I/ 2] + res[(i+1) I/ 2]
|
||
R res
|
||
|
||
print(‘First 61 terms:’)
|
||
print(fusc(61))
|
||
|
||
print()
|
||
print(‘Points in the sequence where an item has more digits than any previous items:’)
|
||
V f = fusc(20'000'000)
|
||
V max_len = 0
|
||
L(i) 0 .< f.len
|
||
I String(f[i]).len > max_len
|
||
max_len = String(f[i]).len
|
||
print((i, f[i]))
|