I have a matrix ,e.g., d2={{3,2},{4,1},{5,6}}
, and I want to create a 3D array, e.g., d3={{3,18,2},{4,32,1},{5,50,6}}
from the 2D matrix, note that the inserted middle element is 2 times the square of the first element . I can not figure out how to do this in mathematica