There’s a pretty simple explanation for this all: For a 31-day month to have 5 Fridays, Saturdays, and Sundays, the first day needs to be a Friday. Each nonleap year has 365 days, which is 52 weeks plus one day [52*7=364; 364+1=365.] So every passing year will ‘push’ the first day of the month forward by one day, defining ‘forward’ as Friday -> Saturday, Saturday -> Sunday, etc. However, if it’s a leap year, the first day of the month will be pushed forward by two days. Since any six-year cycle will contain at least one leap year, this means that the same October calendar should reappear every six years [five one-day pushes forward and one two-day push = one full week covered] unless there are two leap years that fall in that space, in which case the whole cycle will be shifted forward by one day.)