Description Usage Arguments References Examples
View source: R/balanced_ternary.R
Write a number n in base 3, substitute every 2 with a -1, then convert to decimal.
1 |
n |
The number of terms of the sequence to generate. |
This sequence in the On-Line Encyclopedia of Integer Sequences: A117966.
The Numberphile video featuring Neil Sloane and Brady Haran: Amazing Graphs II (including Star Wars).
1 2 | bt <- balanced_ternary(200)
plot(bt)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.