Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- def P5 (b):
- temp=0
- if b<5:
- return b
- elif b==5:
- return 3*2
- elif b%3==0:
- temp=int(b/3)
- #print ("multiple of three:"+str(temp))
- return (3)**temp
- else:
- #print ("Value:"+str(math.floor(b/3)))
- return P5((int(math.floor(b/2))))*P5(((int(math.floor(b/2))+1)))
- for i in range (1,50):
- dummy=P5(i)
- print (dummy)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement