{"type":"video","version":"1.0","html":"<iframe src=\"https://www.loom.com/embed/e0270aad10e24acca1e967686f465c99\" frameborder=\"0\" width=\"1248\" height=\"936\" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>","height":936,"width":1248,"provider_name":"Loom","provider_url":"https://www.loom.com","thumbnail_height":936,"thumbnail_width":1248,"thumbnail_url":"https://cdn.loom.com/sessions/thumbnails/e0270aad10e24acca1e967686f465c99-59065a6bfc6df01e.gif","duration":368.403,"title":"Generating the Regular Paperfold Sequence in C#","description":"This Loom demonstrates how to implement a generator for the regular paper-fold (dragon curve) sequence in C#. It explains that the sequence is formed by taking each intermediate sequence as a prefix of the next and defining the limit by inserting an alternating pattern of 1s and 0s between existing terms. The initial C# attempt based on parity of trailing zeros did not work, so the logic was corrected: for position n starting at 1, remove all factors of 2 from n and return 1 if the odd part is 1 mod 4, otherwise return 0 if it is 3 mod 4. The updated code is tested and appears to produce the expected output."}