# Task
 Changu and Mangu are great buddies. Once they found an infinite paper which had 1,2,3,4,5,6,7,8,......... till infinity, written on it.

 Both of them did not like the sequence and started deleting some numbers in the following way.
 ```
First they deleted every 2nd number.
So remaining numbers on the paper: 1,3,5,7,9,11..........till infinity.
Then they deleted every 3rd number.
So remaining numbers on the paper: 1,3,7,9,13,15..........till infinity..
Then they deleted every 4th number.
So remaining numbers on the paper: 1,3,7,13,15..........till infinity.```
Then kept on doing this (deleting every 5th, then every 6th ...) untill they got old and died.

 It is obvious that some of the numbers will never get deleted(E.g. 1,3,7,13..) and hence are know to us as survivor numbers.

 Given a number `n`, check whether its a survivor number or not.

# Input/Output


 - `[input]` integer `n`

  `0 < n <= 10^8`

 
 - `[output]` a boolean value

  `true` if the number is a survivor else `false`.

Source: codewars | Difficulty: EASY

Starter code: def survivor(n):
	

Solutions:
def survivor(n):
	k = 2
	while n >= k and n % k:
		n -= n // k
		k += 1
	return n % k > 0


def survivor(n):
	i = 2
	while i <= n:
		if n % i == 0:
			return False
		n -= n // i
		i += 1
	return True


from itertools import count

def survivor(n):
	for i in count(2):
		if i > n:
			return True
		(q, r) = divmod(n, i)
		if not r:
			return False
		n -= q


def survivor(n):
	print('look for %s' % n)
	last = 0
	for i in range(2, n):
		if last == n:
			return True
		print(n)
		if n % i == 0:
			return False
		else:
			last = n
			n = n - n // i
	return True


def survivor(m):
	i = 2
	while i <= m:
		(q, r) = divmod(m, i)
		if r == 0:
			return False
		(m, i) = (m - q, i + 1)
	return True


def survivor(n):
	d = 2
	while n >= d:
		if n % d == 0:
			return False
		n -= n // d
		d += 1
	return True


def survivor(n):
	(idx, i) = (n, 2)
	while idx % i != 0 and idx > i:
		idx -= idx // i
		i += 1
	return idx % i != 0


import math

def survivor(n):
	for i in range(2, n):
		if n < i:
			break
		if n % i == 0:
			return False
		n = n - n // i
	return True


import math

def survivor(n):
	lst = [1, 3, 7, 13, 19, 27, 39, 49, 67, 79]
	if n < 80:
		return False if n not in lst else True
	for i in range(2, n):
		if n - 1 < i:
			break
		if n % i == 0:
			return False
		n = n - math.ceil(n // i)
	return True