Van Eck sequence: Difference between revisions
m
→{{header|Uiua}}: Reformat
Not a robot (talk | contribs) (Add ABC) |
m (→{{header|Uiua}}: Reformat) |
||
(One intermediate revision by the same user not shown) | |||
Line 3,705:
vanEck(0..9) = 0 0 1 0 2 0 2 2 1 6
vanEck(990..999) = 4 7 30 25 67 225 488 0 10 136
=={{header|Uiua}}==
<syntaxhighlight lang="Uiua">
F ← ⊂⟨0◌|+1⟩>⊙(-1⧻),,⊗⊃⊢(↘1). # Generator function (prepends).
⇌⍥F999 [0] # Generate 1000 terms and flip.
⊃(&p↙¯)(&p↙∘)10 # Print first and last 10 terms.
</syntaxhighlight>
{{out}}
<pre>
[0 0 1 0 2 0 2 2 1 6]
[4 7 30 25 67 225 488 0 10 136]
</pre>
=={{header|Visual Basic .NET}}==
|