Let's say we have a number, `num`. Find the number of values of `n` such that: there exists `n` consecutive **positive** values that sum up to `num`. A positive number is `> 0`. `n` can also be 1.

```python
#Examples
num = 1
#1
return 1

num = 15
#15, (7, 8), (4, 5, 6), (1, 2, 3, 4, 5)
return 4

num = 48
#48, (15, 16, 17)
return 2

num = 97
#97, (48, 49)
return 2
```
The upper limit is `$10^8$`

Source: codewars | Difficulty: EASY

Starter code: def consecutive_sum(num):
	

Solutions:
def consecutive_sum(num):
	upper_limit = 1
	while True:
		if upper_limit * (upper_limit + 1) // 2 > num:
			break
		upper_limit += 1
	return sum([1 if i % 2 and (not num % i) else 1 if not i % 2 and num % i == i // 2 else 0 for i in range(1, upper_limit)])


from math import sqrt

def consecutive_sum(n):
	cnt = 0
	lim = int(sqrt(2 * n))
	m = 1
	while m <= lim:
		u = n / m + m / 2 + 0.5
		if int(u) == u:
			cnt += 1
		m += 1
	return cnt


def consecutive_sum(n):
	top = (1 + (1 + 8 * n) ** 0.5) / 2
	return sum((not (n - (v - 1) * v // 2) % v for v in range(1, int(top))))


from functools import partial
from itertools import accumulate, count, takewhile
from operator import ge

def consecutive_sum(num):
	return sum(((num - start) % step == 0 for (step, start) in enumerate(takewhile(partial(ge, num), accumulate(count(1))), 1)))


def consecutive_sum(num):
	count = 0
	N = 1
	while N * (N + 1) < 2 * num:
		a = (num - N * (N + 1) / 2) / (N + 1)
		if a - int(a) == 0.0:
			count += 1
		N += 1
	return count + 1


from math import sqrt

def consecutive_sum(num):
	counter = 1
	for i in range(2, int(sqrt(2 * num) + 1)):
		if i % 2 == 0:
			if num / i - num // i == 0.5:
				counter += 1
		elif num / i == num // i:
			counter += 1
	return counter


def factors(n):
	seen = {1, n}
	for a in range(2, 1 + int(n ** 0.5)):
		(b, m) = divmod(n, a)
		if m == 0:
			if a in seen:
				break
			seen.add(a)
			seen.add(b)
	return sorted(seen)

def consecutive_sum(num):
	return sum((1 for d in factors(num) if d % 2))


from functools import reduce

def divisors(n):
	return sorted(set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0))))

def consecutive_sum(n):
	return len([x for x in divisors(n) if x % 2 != 0])


from numpy import roots

def consecutive_sum(num):
	return sum((num % i == (i >> 1) * (i & 1 ^ 1) for i in range(1, int(roots([1 / 2, 1 / 2, -num])[1] + 1))))


def consecutive_sum(num):
	sol = 1
	nums = 1
	i = 2
	while num > nums:
		if (num - nums) % i == 0:
			sol += 1
		nums += i
		i += 1
	return sol