What is the rule for this function?

Input is 1 output is 3,input is 2 output is 6,inputs is 3 output is 10,input is 4 output is 15,input is 5 output is 21

so, we have

1 3
2 6
3 10
4 15
5 21
Those are the triangular numbers: f(n) = (n+1)(n+2)/2
or, note that the 2nd differences are constant, so you have a quadratic function f(n) = an^2+bn+c, then use any three points to determine a,b,c