Memory is a crucial cognitive process involving several subsystems: sensory memory (SM), short-term memory (STM), working memory (WM), and long-term memory (LTM). While each has been extensively studied, the interaction between WM and LTM, particularly in relation to predicting temporal sequences, remains largely unexplored. This study investigates the relationship between WM and LTM, and how these relate to aging and musical training. Using three datasets with a total of 244 healthy volunteers across various age groups, we examined the impact of WM on LTM recognition of novel and previously memorized musical sequences. Our results show that WM abilities are significantly related to recognition of novel sequences, with a more pronounced effect in older compared to younger adults. In contrast, WM did not similarly impact the recognition of memorized sequences, which implies that different cognitive processes are involved in handling prediction errors compared to confirmatory predictions, and that WM contributes to these processes differently. Additionally, our findings confirm that musical training enhances memory performance. Future research should extend our investigation to populations with cognitive impairments and explore the underlying neural substrates.