# Task
 Initially a number `1` is written on a board. It is possible to do the following operations with it:
```
multiply the number by 3;
increase the number by 5.```
Your task is to determine that using this two operations step by step, is it possible to obtain number `n`?

# Example

 For `n = 1`, the result should be `true`.
 
 `1 = 1`
 
 For `n = 2`, the result should be `false`.
 
 For `n = 3`, the result should be `true`.
 
 `1 x 3 = 3`
 
 For `n = 4`, the result should be `false`.
 
 For `n = 5`, the result should be `false`.
 
 For `n = 6`, the result should be `true`.
 
 `1 + 5 = 6`
 
 For `n = 18`, the result should be `true`.
 
 `1 + 5 = 6  --> 6 x 3 = 18`
 
 For `n = 32`, the result should be `true`.
 
 `1 x 3 x 3 x 3 = 27  --> 27 + 5 = 32`
 
 For `n = 100`, the result should be `false`.
 
 For `n = 101`, the result should be `true`.
 
 `1 + 5 + 5 + 5 ... +5 = 101`
 
# Input / Output


 - `[input]` integer n

  positive integer, n ≤ 100000


 - `[output]` a boolean value

  `true` if N can be obtained using given operations, `false` otherwise.

Source: codewars | Difficulty: EASY
Tags: Ad-hoc

Starter code: def number_increasing(n):
	

Solutions:
def number_increasing(n):
	return n not in {2, 4, 7, 12, 17, 22} and n % 5 != 0


from math import log

def number_increasing(n):
	return any((log(x, 3).is_integer() for x in range(n, 0, -5)))


def number_increasing(n):
	return False if n in (2, 4, 7, 12, 17, 22) or not n % 5 else True


def number_increasing(n):
	if n == 2 or n == 4:
		return False
	if n % 5 == 1:
		return True
	for v in [3 ** i for i in range(1, 11)]:
		if (v - n) % 5 == 0:
			return True
	return False


def number_increasing(n):
	if n == 1:
		return True
	elif n % 5 == 0:
		return False
	else:
		return [1, 27, 3, 9][n % 5 - 1] <= n


def number_increasing(n):
	if n == 1:
		return True
	if (n - 1) % 5 == 0:
		return True
	t = 3
	while t <= n:
		if t == n or (n - t) % 5 == 0:
			return True
		t *= 3
	return False


def number_increasing(n):
	return n not in (2, 4) and (not n % 5 == 0)


LIMIT = 100000
values = set()
for i in range(4):
	values |= set(range(3 ** i, LIMIT, 5))

def number_increasing(n):
	return n in values


invalid = set()

def number_increasing(n):
	if n in invalid or n % 5 == 0:
		return False
	while n > 1:
		if n % 3 == 0 and number_increasing(n // 3):
			return True
		n -= 5
	if n == 1:
		return True
	invalid.add(n)
	return False


def number_increasing(n):
	d = n % 5
	return d % 2 != 0 or (d == 2 and n >= 27) or (d == 4 and n >= 9)