x=lambda n:0**n+sum((-(n%(x-~x)<1))**x*4for x in range(n))print [x(i) for i in range(0,25)]
Standard input is empty
[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]
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!