fork(8) download
  1. x=lambda n:0**n+sum((-(n%(x-~x)<1))**x*4for x in range(n))
  2. print [x(i) for i in range(0,25)]
Success #stdin #stdout 0.01s 8968KB
stdin
Standard input is empty
stdout
[1, 4, 4, 0, 4, 8, 0, 0, 4, 4, 8, 0, 0, 8, 0, 0, 4, 8, 4, 0, 8, 0, 0, 0, 0]