i wanna write a program that returns the following sequence to the number that the user enters.
the sequence is :
4, 6, 12, 12, 24, 18, 36, 24, 48, 30, 60, 36, ...
and the formula for that is :
f(x) = {f(x - 1) \* 2 for odd numbers}and{ x \* 3 for even numbers}
$ you can see the mathematic formula in the picture[enter image description here](https://i.stack.imgur.com/MiKfQ.jpg)

for example:

if user enter 5 as an input should be seen

[4, 6, 12, 12, 24]

as an output.

please help i wanna solve this ...

```
inp = input("Enter the input separated with spaces ").split()
output=[]
for i in inp:
    if int(i)%2==0:
        output.append(int(i)*3)
    else:
        output.append((int(i)-1)*6)
print(output)

```