Memory formation by neuronal synchronization