7 lines
324 B
Text
7 lines
324 B
Text
# Generate Van Eck sequence.
|
|
F ← (
|
|
◡<⊙⊙◌⊃(⋅⧻|⊸˜⨂)°⊂. # Check where/if first digit already appeared.
|
|
⊂⨬(⋅⋅0|⋅+₁) # If new, prepend zero, else last index it was in.
|
|
)
|
|
⇌⍥F999 [0] # Generate 1000 terms and reverse.
|
|
⊃(&p↙¯)(&p↙∘)10 # Print first and last 10 terms.
|