## Problem Description and Formulation

The problem requires minimizing an objective function subject to several constraints. The objective function is:

\[ 3.09 \times (\text{milligrams of vitamin B6})^2 + 8.41 \times (\text{milligrams of vitamin B6}) \times (\text{milligrams of calcium}) + 2.01 \times (\text{milligrams of calcium})^2 + 8.39 \times (\text{milligrams of calcium}) \]

The constraints are:

1. The immune support index of milligrams of vitamin B6 is 16.
2. The immune support index of milligrams of vitamin B2 is 20.
3. The immune support index of milligrams of calcium is 22.
4. The total combined immune support index from milligrams of vitamin B2 and milligrams of calcium must be greater than or equal to 52.
5. The total combined immune support index from milligrams of vitamin B6, milligrams of vitamin B2, and milligrams of calcium must be at least 52.
6. The total combined immune support index from milligrams of vitamin B6 and milligrams of calcium must be less than or equal to 101.
7. Milligrams of vitamin B6 can be a non-whole number.
8. Milligrams of vitamin B2 must be a whole number.
9. Milligrams of calcium can be a non-whole number.

## Gurobi Code Formulation

Given the problem description, we can formulate the Gurobi code as follows:

```python
import gurobi

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

    # Define variables
    vitamin_B6 = model.addVar(lb=-gurobi.GRB.INFINITY, ub=gurobi.GRB.INFINITY, name="vitamin_B6")
    vitamin_B2 = model.addVar(lb=0, ub=gurobi.GRB.INFINITY, vtype=gurobi.GRB.INTEGER, name="vitamin_B2")
    calcium = model.addVar(lb=-gurobi.GRB.INFINITY, ub=gurobi.GRB.INFINITY, name="calcium")

    # Objective function
    model.setObjective(3.09 * vitamin_B6**2 + 8.41 * vitamin_B6 * calcium + 2.01 * calcium**2 + 8.39 * calcium, gurobi.GRB.MINIMIZE)

    # Constraints
    model.addConstr(vitamin_B6, '=', 16, name="vitamin_B6_constraint")
    model.addConstr(vitamin_B2, '=', 20, name="vitamin_B2_constraint")
    model.addConstr(calcium, '=', 22, name="calcium_constraint")
    model.addConstr(vitamin_B2 + calcium, '>=', 52, name="B2_calcium_index_constraint")
    model.addConstr(vitamin_B6 + vitamin_B2 + calcium, '>=', 52, name="total_index_constraint")
    model.addConstr(vitamin_B6 + calcium, '<=', 101, name="B6_calcium_index_constraint")

    # Optimize
    model.optimize()

    # Print solution
    if model.status == gurobi.GRB.OPTIMAL:
        print("Optimal solution found.")
        print(f"Milligrams of vitamin B6: {vitamin_B6.varValue}")
        print(f"Milligrams of vitamin B2: {vitamin_B2.varValue}")
        print(f"Milligrams of calcium: {calcium.varValue}")
        print(f"Objective function value: {model.objVal}")
    else:
        print("No optimal solution found.")

optimize_nutrition()
```

This code defines the optimization problem using Gurobi's Python interface, sets up the objective function and constraints according to the problem description, and then solves the optimization problem. The solution is printed out if an optimal solution is found.