Following are four functions intended to return the value a[1] + a[2] + g+ a[n] for n 1 (the sum of the first n entries in an array of integers). For those that do not produce correct results, explain what goes wrong. For those that do produce correct results, do a proof of correctness. a. ArraySumA (integers n, a[1], a[2], , a[n]) Local variables: integers i, j i = 0 j = 0 while i n do i = i + 1 j = j + a[i] end while //j now has the value a[1] + a[2] + g+ a[n] return j end function ArraySumA b. ArraySumB (integers n, a[1], a[2], , a[n]) Local variables: integers i, j i = 1 j = 0 while i n do j = j + a[i] i = i + 1 end while //j now has the value a[1] + a[2] + g+ a[n] return j end function ArraySumB c. ArraySumC (integers n, a[1], a[2], , a[n]) Local variables: integers i, j i = 0 j = 0 while i n do j = j + a[i] i = i + 1 end while //j now has the value a[1] + a[2] + g+ a[n] return j end function ArraySumC

L31 - 7 2) Consider the following formula ▯n n(n +1(2 n +1) 1 +2 + ... + n = i = . i=1 6 Use it to ﬁnd the...