We have a set of consecutive numbers from ```1``` to ```n```.
We want to count all the subsets that do not contain consecutive numbers.
E.g.

If our set ```S1``` is equal to ```[1,2,3,4,5]```
The subsets that fulfill these property are:
```
[1],[2],[3],[4],[5],[1,3],[1,4],[1,5],[2,4],[2,5],[3,5],[1,3,5]
```
A total of      ```12   ``` subsets.

From the set ```S2``` equals to```[1,2,3]```, it is obvious that we have only ```4``` subsets and are:
```
[1],[2],[3],[1,3]
```
Make a code that may give the amount of all these subsets for any integer       ```n >= 2       ```.

Features of the random tests:
```
number of tests = 100 
10 <= n <= 120
```

Source: codewars | Difficulty: EASY
Tags: Number theory

Fundamentals

Starter code: def f(n):
	

Solutions:
def f(n):
	(a, b) = (0, 1)
	for _ in range(n):
		(a, b) = (b, a + b + 1)
	return a


def f(n):
	(a, b) = (1, 2)
	for _ in range(n):
		(a, b) = (b, a + b)
	return a - 1


f = lambda n, a=0, b=1: f(n - 1, b, a + b) if n != -2 else a - 1


def f(n):
	xs = [0, 1, 2]
	for i in range(n - len(xs) + 1):
		xs.append(2 * xs[-1] - xs[-3])
	return xs[n]


fib = [1, 2]
for _ in range(1000):
	fib.append(fib[-2] + fib[-1])

def f(n):
	return fib[n] - 1


FIBS = [1, 1]

def f(n):
	while len(FIBS) <= n + 1:
		FIBS.append(FIBS[-2] + FIBS[-1])
	return FIBS[n + 1] - 1


def f(n):
	if n == 1:
		return 1
	elif n == 0:
		return 0
	(a, b) = (1, 2)
	for i in range(0, n - 2):
		(a, b) = (b, a + b + 1)
	return b


def f(n):
	n = n + 2
	(a, b) = (0, 1)
	while n > 0:
		(a, b) = (b, a + b)
		n -= 1
	return a - 1