31 lines
508 B
Plaintext
31 lines
508 B
Plaintext
maximo = 20000000
|
|
dim f(maximo)
|
|
|
|
fusc()
|
|
|
|
for i = 0 to 60
|
|
print f(i), " ";
|
|
next i
|
|
|
|
print "\n\n Index Value"
|
|
d = 0
|
|
for i = 0 to maximo-1
|
|
if f(i) >= d then
|
|
print i using "###,###,###", f(i) using "###,###,###"
|
|
if d = 0 d = 1
|
|
d = d * 10
|
|
end if
|
|
next i
|
|
end
|
|
|
|
sub fusc()
|
|
f(0) = 0 : f(1) = 1
|
|
for n = 2 to maximo-1
|
|
if mod(n, 2) then
|
|
f(n) = f((n-1) / 2) + f((n+1) / 2)
|
|
else
|
|
f(n) = f(n / 2)
|
|
end if
|
|
next n
|
|
end sub
|