Small groups and long memories promote cooperation | Synapse