Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,13 @@
function hofstQseq(n, typerst::Type=Int)
nmax = maximum(n)
r = Vector{typerst}(nmax)
r[1] = 1
if nmax ≥ 2 r[2] = 1 end
for i in 3:nmax
r[i] = r[i - r[i - 1]] + r[i - r[i - 2]]
end
return r[n]
end
println("First ten elements of sequence: ", join(hofstQseq(1:10), ", "))
println("1000-th element: ", hofstQseq(1000))

View file

@ -0,0 +1,3 @@
seq = hofstQseq(1:100_000)
cnt = count(diff(seq) .< 0)
println("$cnt elements are less than the preceding one.")