Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
18
Task/Van-Eck-sequence/11l/van-eck-sequence.11l
Normal file
18
Task/Van-Eck-sequence/11l/van-eck-sequence.11l
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
F van_eck(c)
|
||||
[Int] r
|
||||
V n = 0
|
||||
V seen = [0]
|
||||
V val = 0
|
||||
L
|
||||
r.append(val)
|
||||
I r.len == c
|
||||
R r
|
||||
I val C seen[1..]
|
||||
val = seen.index(val, 1)
|
||||
E
|
||||
val = 0
|
||||
seen.insert(0, val)
|
||||
n++
|
||||
|
||||
print(‘Van Eck: first 10 terms: ’van_eck(10))
|
||||
print(‘Van Eck: terms 991 - 1000: ’van_eck(1000)[(len)-10..])
|
||||
Loading…
Add table
Add a link
Reference in a new issue