Intrinsic periodicity associated with quantum-well states in a magnetic sandwich