Nitrogen factor appears to be a method of estimating protein content in a specific foodstuff based on the amount of nitrogen (since proteins are nitrogen rich). It is not exact, and there are different factors for different types of foods, to provide better estimates based on the ratios and types of proteins in those foods.
This 1931 USDA document gives an excellent background, even though it is somewhat of a bad scan, and challenging to read.
See also, for example, the FAO Conversion Table showing different factors for different foods.
As proteins are a calorific food, the nitrogen factor correlates with calories from protein because it helps you estimate the amount of protein in a food, and therefore the number of calories from protein based on the fact that protein has about 17 kJ or 4 kcal per gram.
Therefore, if you know you have
g grams of a food, with a nitrogen factor of
f, the estimated number of calories from protein
c = g * f * 4
I was unable to find a definitive clear meaning of the phrase "protein factor" as it is a common phrase in biochemistry, evidently.