Hofstadter Q sequence: Difference between revisions

Content deleted Content added
Peak (talk | contribs)
jq
Peak (talk | contribs)
m →‎{{header|jq}}: third task
Line 1,014:
# The twothree tasks at hand:
((range(0;11), 1000) | "Q(\(.)) = \( . | Q)"),
 
(100 | "flips(\(.)) = \(flips(.))")</lang>
Line 1,032:
Q(9) = 6
Q(10) = 6
Q(1000) = 502
flips(100000) = 49798
 
Line 1,038 ⟶ 1,039:
sys 0m8.502s
</lang>
 
=={{header|Julia}}==
The following implementation accepts an argument that is a single integer, an array of integers, or a range: