I am initializing a table inside a function as follows:

```
f[a1_, a2_, a3_] := Module[{RM = Table[a1+a2+a3+i1, {i1, 1, 10}]}, Plus@@RM]

```

I am calling the function `f` multiple times with different values of `a1, a2, a3` and want the function to exit, if `300<a1+a2+a3+i1<500`

How can I do it elegantly by not initializing the table and later checking to proceed or `Break`?

This is what I have started to do, but could not go too far:

```
LL[a1_, a2_, a3_, x_] := 300 < a1+a2+a3+i1 < 500;
f[a1_, a2_, a3_] := Module[{RM = Table[If[L[a1, a2, a3, i1]==True,L[a1, a2, a3, i1],
        Break[]] , {i1, 1, 10}]},Plus@@RM]

```