## Step 1: Define the symbolic variables
Let's define the symbolic variables for the problem:
- $x_1$ represents the number of pens bought and sold.
- $x_2$ represents the number of pencils bought and sold.

## Step 2: Formulate the objective function
The objective function is to maximize profit. Each pen is sold for a profit of $3, and each pencil is sold for a profit of $1. Therefore, the objective function can be represented as:
\[ \text{Maximize:} \quad 3x_1 + x_2 \]

## 3: Define the constraints
The constraints based on the problem description are:
1. The store owner can spend at most $500 on inventory. Given that each pen costs $2 and each pencil costs $1:
\[ 2x_1 + x_2 \leq 500 \]
2. At least 100 pens but at most 150 pens are sold each month:
\[ 100 \leq x_1 \leq 150 \]
3. The number of pencils sold is at most twice the amount of pens sold:
\[ x_2 \leq 2x_1 \]
4. Non-negativity constraints (since the number of items cannot be negative):
\[ x_1 \geq 0, \quad x_2 \geq 0 \]
However, given that $x_1 \geq 100$, the $x_1 \geq 0$ constraint is implicitly satisfied.

## 4: Symbolic Representation
The symbolic representation of the problem is:
```json
{
'sym_variables': [('x1', 'pens'), ('x2', 'pencils')],
'objective_function': '3*x1 + x2',
'constraints': [
    '2*x1 + x2 <= 500',
    '100 <= x1 <= 150',
    'x2 <= 2*x1'
]
}
```

## 5: Gurobi Code
To solve this problem using Gurobi in Python, we can use the following code:
```python
import gurobi

def solve_problem():
    # Create a new model
    model = gurobi.Model()

    # Define the variables
    x1 = model.addVar(lb=100, ub=150, name="pens")  # At least 100, at most 150 pens
    x2 = model.addVar(lb=0, name="pencils")  # Non-negative number of pencils

    # Objective function: Maximize 3*x1 + x2
    model.setObjective(3*x1 + x2, gurobi.GRB.MAXIMIZE)

    # Constraints
    model.addConstr(2*x1 + x2 <= 500, name="inventory_cost")  # Inventory cost constraint
    model.addConstr(x2 <= 2*x1, name="pencils_vs_pens")  # Pencils vs pens constraint

    # Optimize the model
    model.optimize()

    # Print the solution
    if model.status == gurobi.GRB.OPTIMAL:
        print("Optimal solution found.")
        print(f"Number of pens: {x1.varValue}")
        print(f"Number of pencils: {x2.varValue}")
        print(f"Max Profit: {model.objVal}")
    else:
        print("No optimal solution found.")

solve_problem()
```

The final answer is: 
```python
import gurobi

def solve_problem():
    # Create a new model
    model = gurobi.Model()

    # Define the variables
    x1 = model.addVar(lb=100, ub=150, name="pens")  # At least 100, at most 150 pens
    x2 = model.addVar(lb=0, name="pencils")  # Non-negative number of pencils

    # Objective function: Maximize 3*x1 + x2
    model.setObjective(3*x1 + x2, gurobi.GRB.MAXIMIZE)

    # Constraints
    model.addConstr(2*x1 + x2 <= 500, name="inventory_cost")  # Inventory cost constraint
    model.addConstr(x2 <= 2*x1, name="pencils_vs_pens")  # Pencils vs pens constraint

    # Optimize the model
    model.optimize()

    # Print the solution
    if model.status == gurobi.GRB.OPTIMAL:
        print("Optimal solution found.")
        print(f"Number of pens: {x1.varValue}")
        print(f"Number of pencils: {x2.varValue}")
        print(f"Max Profit: {model.objVal}")
    else:
        print("No optimal solution found.")

solve_problem()
```