Answer:
f(x) = 1.5x - 0.5x
Step-by-step explanation:
The function of the pattern represented by the pentagonal numbers is the sum of three triangular numbers. 
The triangular number general formula
                       x (x + 1) / 2 
For  example, 
The sequence 
1,     3,     6,      10 
                                              *
                           *              *  *
          *           *   *          *   *  *
* ,    *  *,     *   *   *,     *   *   *  *
_____________________________
The pentagonal numbers
The sequence: 
1, 5, 12, 22, 35 
As shown in the picture can be divided into three triangles
Triangle 2 
 x (x + 1) / 2 
Triangle 1 and 3  (they are triangles one unit smaller than 2)
n (n + 1) / 2 
n= x-1
Replacing n
(x-1) ((x-1) + 1) / 2 
(x-1) (x) / 2 
(x-1) x / 2 
______________
Function represents the pattern
Triangle 2  + (Triangle 1  +  Triangle 3) 
Triangle 1  = Triangle 3
So then, 
Triangle 2 + 2* Triangle 1
x (x +1) /2  + 2* (x -1) x/2
 
Rearranging
0.5 x (x +1) + x(x -1)
0.5x^2 + 0.5x + x^2 -x 
(0.5 x^2 + x^2)  + (0.5x -x )
1.5 x^2 - 0.5 x  
______