def get_number(x, r):
l = []
for i in range(len(x)):
if i+1
l.append(x[i])
break
def look_forward(i,x,l):
for j in range(i,len(x)):
if x[i]+r
l.append(x[j])
return look_forward(j,x,l)
look_forward(i,x,l)
print l
if name == "main":
get_number([1,2,4,5,8,12], 3)