Not necessarily. Lines 16 - 20 are used to determine the loan's book balance each year. If any loan has a balance over $25,000 at the end of the year, it is automatically considered a Formal Note even if no loan agreement exists. Lines 21 - 31 are used to calculate your debt basis which does not include certain non-deductible expenses.
Line 23 is used to report increased basis if line 21 is less than line 16. The increase amounts are reported from your increases in stock basis.