Sub EnumPent_OEIS() Dim a As Long, b As Long, c As Long, d As Long, e As Long Dim nP As Long, nMax As Long nMax = 1 Do nP = 0: For a = 1 To nMax For b = 1 To nMax For c = 1 To nMax For d = 1 To nMax For e = 1 To nMax DoEvents If a < b + c + d + e And b < c + d + e + a And c < d + e + a + b And _ d < e + a + b + c And e < a + b + c + d Then nP = nP + 1 End If Next e Next d Next c Next b Next a Debug.Print "n="; nMax, "nP="; nP nMax = nMax + 1 Loop While nMax <= 20 beep End Sub