“Get Lucky” took more than 18 months to write. The duo came up with the chord progression and organ part early on, then asked Mr. Hakim and Mr. East to record a rhythm track. Mr. Rodgers laid down the guitar tracks at the Electric Lady Studios in Manhattan, where he recorded his first Chic single in the 1970s. He jammed over the tracks, playing his trademark chord inversions and chicken-scratch rhythms until the riff emerged.