Showing results for tags 'collatz'. - Opusmodus Jump to content Home Existing user? Sign In Sign In Remember me Not recommended on shared computers Sign In Forgot your password? Sign Up Browser Home Page Forums Topics Calendar Community Map More Activity All Activity My Activity Streams Unread Content Content I Started Search More Videos Getting Started How-to in 100 sec HowTo Live Coding Presentation Music Theory and Analysis More Tutorials OMN The Language Tutorial Guide CLM Examples More Lessons GUI OMN Snippet MIDI Display Notation Live Coding Graphs System Library More Downloads Archive Changelog More Buy Clubs More More Everywhere Topics Events Products Pages Documents Videos Markers Members All Activity Home Search Search the Community Showing results for tags 'collatz'. Search Again More search options Content Search Member Search Search By Tags collatz Type tags separated by commas. Match term OR tags Match term AND tags Search By Author Search By Author Content Type All Content Topics Events Products Pages Documents Videos Markers Forums Community Clubs Welcome to Opusmodus Announcements Pre Sales Questions Support Forum Support & Troubleshooting OMN Lingo Function Examples Score and Notation Live Coding Instrument Library Setup MIDI Setup Question & Answer Suggestions & Ideas Zoom into Opusmodus Sharing Made In Opusmodus User Extensions Source Code Welcome to Opusmodus - Announcements - Pre Sales Questions Support Forum - Support & Troubleshooting - OMN Lingo - Function Examples - Score and Notation - Live Coding Instrument - Library Setup - MIDI Setup Question & Answer - Suggestions & Ideas - Zoom into Opusmodus Sharing - Made In Opusmodus - User Extensions Source Code Calendars Community Clubs Community Calendar Community Calendar Product Groups Software Software Categories OMN The Language Tutorial Guide CLM Examples OMN The Language Tutorial Guide CLM Examples Categories Community Clubs Getting Started HowTo Live Coding Music Theory and Analysis How-to in 100 sec Presentation Convention Getting Started HowTo Live Coding Music Theory and Analysis How-to in 100 sec Presentation Convention Categories Members Members Find results in... Content titles and body Content titles only Find results that contain... All of my search term words Any of my search term words Date Created Any Last 24 hours Last week Last month Last six months Last year Custom Start End Last Updated Any Last 24 hours Last week Last month Last six months Last year Custom Start End Filter by number of... 0 Comments Minimum number of comments 0 Replies Minimum number of replies 0 Reviews Minimum number of reviews 0 Views Minimum number of views Members Joined Any Last 24 hours Last week Last month Last six months Last year Custom Start End Group Administrators Developers Members Moderators Partners Website URL Gender forums_forum_2 Male Female Location Interests About Me Search Content Cancel Found 1 result Sort By Date Relevancy collatz => gen-sequence + collatz-transition AM posted a topic in User Extensions Source Code https://en.wikipedia.org/wiki/Collatz_conjecture ;;experiment with COLLATZ-conjecture ;;https://en.wikipedia.org/wiki/Collatz_conjecture (defun collatz (start-value number-of-value) (loop repeat number-of-value with value = start-value when (evenp value) do (setq value (/ value 2)) else do (setq value (+ (* 3 value) 1)) collect value)) (list-plot (collatz 15 20) :zero-based t :point-radius 2 :join-points t) ;;;;;;;;;;;; ;;same function like fibonacci-transition but now with COLLATZ. ;;don't know if that makes sense - just a bit code :-) (defun transition-with-collatz (number-of-values start-val value-a value-b) (let ((coll-length) (coll-seq) (all-seq)) (setq coll-length (loop for cnt = 1 then (incf cnt) collect (sum (collatz start-val cnt)) into bag when (> (car (last bag)) number-of-values) do (return (1- (length bag)))) coll-seq (collatz start-val coll-length) all-seq (append (reverse coll-seq) (loop repeat (- number-of-values (sum coll-seq)) collect 1))) (loop for i in all-seq append (loop repeat i for cnt = 0 then (incf cnt) when (= cnt 0) collect value-b else collect value-a)))) ;;example-1 => only the process => makes sense when using a lot of values... (list-plot (transition-with-collatz 500 56 1 2) :zero-based t :point-radius 2 :join-points t) August 6, 2016 2 replies 2 collatz lisp All Activity Home Search Theme OPMO (Default) Factory Privacy Policy Copyright © MMXXII Opusmodus™ Ltd. All rights reserved. Product features, specifications, system requirements and availability are subject to change without notice. Opusmodus, the Opusmodus logo, and other Opusmodus trademarks are either registered trademarks or trademarks of Opusmodus Ltd. All other trademarks contained herein are the property of their respective owners. Powered by Invision Community × Existing user? Sign In Sign Up Browser Back Home Page Forums Topics Calendar Community Map Activity Back All Activity My Activity Streams Unread Content Content I Started Search Videos Back Videos Getting Started How-to in 100 sec HowTo Live Coding Presentation Music Theory and Analysis Tutorials Back Tutorials OMN The Language Tutorial Guide CLM Examples Lessons GUI Back OMN Snippet MIDI Display Notation Live Coding Graphs System Library Downloads Back Downloads Archive Changelog Buy Clubs × Create New... Important Information Terms of Use Privacy Policy I accept GDPR Cookie Consent by Free Privacy Policy Generator