Some formulas concerning nonsingular algebraic varieties embedded in some ambient variety