I had to cycle through every combination. The number of these combinations in which no three ranks are within a span of 5 is 79. There are combin(13,5)=1287 ways to arrange 5 ranks out of 13. So the probability that no more than two of one suit will be present is (360+240)/1024 = 600/1024 = 58.59%. There are 4 5=1024 ways to arrange four suits on five different ranks. 2 is the number of ways to choose one rank out of two for the second suit of one. 3 is the number of ways to choose one rank out of the three left for the first suit of one. Combin(5,2) is the number of ways to choose two ranks out of five for that suit of two cards. 4 is the number of ways to choose one suit out of four for the suits represented twice. The probability these five ranks will represent four suits, one of two, and three of one, is 4*combin(5,2)*3*2=240. 4 5 for the number of ways to choose two ranks out of the three left for the other suit of two.
Combin(5,2) for the number of ways to choose two ranks out of five for the first suit of two cards. 2 for the two ways to choose the suit represented once. Combin(4,2) is the number of ways to choose two suits out of four for the suits represented twice. The probability that these five ranks will represent three suits, two of two, and one of one, is combin(4,2)*2*combin(5,2)*combin(3,2)=360. The number of combinations of five different ranks on the board is combin (13,5)*4 5 = 1287 × 1024 = 1,317,888.