OFFSET
1,3
FORMULA
a(n) = Sum_{k=1..floor(n/2)} (k mod 10) * ((n-k) mod 10).
EXAMPLE
a(20) = 165; There are 10 ways to write 20 as the sum of two positive integers: (19,1), (18,2), (17,3), (16,4), (15,5), (14,6), (13,7), (12,8), (11,9), and (10,10). Using the final digits from each pair as the side lengths of the rectangles, the combined area is 9*1 + 8*2 + 7*3 + 6*4 + 5*5 + 4*6 + 3+7 + 2*8 + 1*9 + 0*0 = 165.
MATHEMATICA
Table[Sum[Mod[k, 10]*Mod[n - k, 10], {k, Floor[n/2]}], {n, 60}]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Jun 06 2021
STATUS
approved