RosettaCodeData/Task/Van-Eck-sequence/Mathematica/van-eck-sequence.math

2 lines
146 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
TakeList[Nest[If[MemberQ[#//Most, #//Last], Join[#, Length[#] - Last@Position[#//Most, #//Last]], Append[#, 0]]&, {0}, 999], {10, -10}] // Column