Problem
ALG-B1-M08-P013 Triangular numbers
#13
★★★☆☆ Level 3 of 5
Let \(f:\mathbb Z\to\mathbb Z\), \(f(m+n)=f(m)+f(n)+mn\), \(f(0)=0\), \(f(1)=0\). Find \(f(n)\).
Compare with the function \(\frac{n(n-1)}{2}\).
Set \(g(n)=f(n)-\frac{n(n-1)}{2}\). Since \(\frac{(m+n)(m+n-1)}{2}=\frac{m(m-1)}{2}+\frac{n(n-1)}{2}+mn\), we get \(g(m+n)=g(m)+g(n)\).
Because \(g(1)=0\), \(g(n)=0\) for all integers \(n\). Therefore \(f(n)=\frac{n(n-1)}{2}\).
Shows that the quadratic extra term is not always \(n^2\); the exact model matters.