记{a1,a2,a3,a4,a5}为等差数列,公差为d,则a5-a1=4d
a5最大为30,则a1=a5-4d
因此a1可取1~(30-4d)
所以对于d,共有30-4d个,d=1~7
d=1,则有{1,2,3,4,5},{2,3,4,5,6},{26,27,28,39.30},共26个
d=2,则有{1,3,5,7,9},{2,4,6,8,10},{22,24,26,28,30},共22个
d=3,则有{1,4,7,10,13},...{18,21,24,27.30},共18个
d=4,则有{1,5,9,13,17},.{14,18,22,26,30},共14个
d=5,则有{1,6,11,16,21},..{10,15,20,25,30},共10个
d=6,则有{1,7,13,19,25},...{6,12,18,24,30},共6个
d=7,则有{1,8,15,22,29},{2,9,16,23,30},共2个
总个数=30*7-4*7*8/2=210-112=98个