The fluctuating planetary gravitational field influences not only activities on the Sun but also on the Earth. A special correlation function describes the harmonics of these fluctuations. Groups of earthquakes form oscillation patterns that differ significantly from randomly chosen control groups. These patterns are suitable as an element of an AI for the probability of earthquakes.