Create two series in Excel for the two events. Then creatively prune the columns and visually find entries in the two columns that match.
Diophantine Solution:
Given that 1986 + 76i = 1987 + 17j
Simplifying 76i –17j = 1
See Diophantine example for technique used to solve equation.
i = 15 + 17m where m = any integer
j = 67 + 76m where m = any integer
When m = 0, i = 15 and j = 67. Halley’s comet will appear in 1986 + 76 * 15 = 3126
Doublecheck:
1987 + 17 * 67 = 3126. The cicadas will appear that year too.

Tabulators separate ballots into piles for each presidential candidate during a recount in Dane County (Wis.) on December 1, 2016 in Madison, Wisconsin. (Getty)