fork download
  1. def f(n):
  2. i=1;a=[]
  3. for _ in range(n):
  4. while any(i+x in[y*2for y in a]for x in a):i+=1
  5. a+=[i]
  6. return a[n-1]
  7.  
  8. for i in range(1,21):
  9. print(f(i))
Success #stdin #stdout 0.04s 9984KB
stdin
Standard input is empty
stdout
1
2
4
5
10
11
13
14
28
29
31
32
37
38
40
41
82
83
85
86