Online Algorithms on Antipowers and Antiperiods