Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
46
Task/Fusc-sequence/00-TASK.txt
Normal file
46
Task/Fusc-sequence/00-TASK.txt
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
;Definitions:
|
||||
The '''fusc''' integer sequence is defined as:
|
||||
::* fusc(0) = 0
|
||||
::* fusc(1) = 1
|
||||
::* for '''n'''>1, the '''n'''<sup>th</sup> term is defined as:
|
||||
::::* if '''n''' is even; fusc(n) = fusc(n/2)
|
||||
::::* if '''n''' is odd; fusc(n) = fusc<big>(</big>(n-1)/2<big>)</big> <big>+</big> fusc<big>(</big>(n+1)/2<big>)</big>
|
||||
|
||||
|
||||
Note that MathWorld's definition starts with unity, not zero. This task will be using the OEIS' version (above).
|
||||
|
||||
|
||||
|
||||
;An observation:
|
||||
:::::* fusc(A) = fusc(B)
|
||||
|
||||
where '''A''' is some non-negative integer expressed in binary, and
|
||||
where '''B''' is the binary value of '''A''' reversed.
|
||||
|
||||
|
||||
|
||||
Fusc numbers are also known as:
|
||||
::* fusc function (named by Dijkstra, 1982)
|
||||
::* Stern's Diatomic series (although it starts with unity, not zero)
|
||||
::* Stern-Brocot sequence (although it starts with unity, not zero)
|
||||
|
||||
|
||||
|
||||
;Task:
|
||||
::* show the first '''61''' fusc numbers (starting at zero) in a horizontal format.
|
||||
::* show the fusc number (and its index) whose length is greater than any previous fusc number length.
|
||||
::::* (the length is the number of decimal digits when the fusc number is expressed in base ten.)
|
||||
::* show all numbers with commas (if appropriate).
|
||||
::* show all output here.
|
||||
|
||||
|
||||
;Related task:
|
||||
::* [[Stern-Brocot_sequence|RosettaCode Stern-Brocot sequence]]
|
||||
<!-- This is similar as "generate primes by trial division", and "generate primes via a sieve". Both Rosetta Code tasks have their uses and methods of generation. !~-->
|
||||
|
||||
|
||||
;Also see:
|
||||
::* the MathWorld entry: [http://mathworld.wolfram.com/SternsDiatomicSeries.html Stern's Diatomic Series].
|
||||
::* the OEIS entry: [http://oeis.org/A2487 A2487].
|
||||
<br><br>
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue