about | help | code help+videos | done | prefs |
This variation on the Fibonacci sequence uses subtraction instead of addition. In this sequence the first two numbers are 1 and 2. Each subsequent value is the difference of the previous two values. The third value is 1-2 or -1. The fourth value is 2-(-1) or 3. The first ten numbers in this sequence are 1, 2, -1, 3, -4, 7, -11, 18, -29 and 47. (You can read more about sequences like this at https://oeis.org/A061084) subtractonacci(0) → 1 subtractonacci(1) → 2 subtractonacci(2) → -1 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Copyright Nick Parlante 2017 - privacy