Odpowiedź:
Dla #S_k (n) = sum_ {i = 0} ^ n i ^ k #
# S_1 (n) = (n (n + 1)) / 2 #
# S_2 (n) = 1/6 n (1 + n) (1 + 2 n) #
# S_3 (n) = ((n + 1) ^ 4- (n + 1) -6S_2 (n) -4S_1 (n)) / 4 #
Wyjaśnienie:
Mamy
#sum_ {i = 0} ^ n i ^ 3 = sum_ {i = 0} ^ n (i + 1) ^ 3 - (n + 1) ^ 3 #
#sum_ {i = 0} ^ ni ^ 3 = sum_ {i = 0} ^ ni ^ 3 + 3 sum_ {i = 0} ^ ni ^ 2 + 3 sum_ {i = 0} ^ ni + sum_ {i = 0} ^ n 1- (n + 1) ^ 3 #
# 0 = 3 sum_ {i = 0} ^ n i ^ 2 + 3 sum_ {i = 0} ^ n i + sum_ {i = 0} ^ n 1- (n + 1) ^ 3 #
rozwiązywanie dla #sum_ {i = 0} ^ n i ^ 2 #
#sum_ {i = 0} ^ n i ^ 2 = (n + 1) ^ 3 / 3- (n + 1) / 3-sum_ {i = 0} ^ n i #
ale #sum_ {i = 0} ^ n i = ((n + 1) n) / 2 # więc
#sum_ {i = 0} ^ n i ^ 2 = (n + 1) ^ 3 / 3- (n + 1) / 3 - ((n + 1) n) / 2 #
#sum_ {i = 0} ^ n i ^ 2 = 1/6 n (1 + n) (1 + 2 n) #
Korzystając z tej samej procedury dla #sum_ {i = 0} ^ n i ^ 3 #
#sum_ {i = 0} ^ n i ^ 4 = sum_ {i = 0} ^ n (i + 1) ^ 4 - (n + 1) ^ 4 #
#sum_ {i = 0} ^ ni ^ 4 = sum_ {i = 0} ^ ni ^ 4 + 4 sum_ {i = 0} ^ ni ^ 3 + 6 sum_ {i = 0} ^ ni ^ 2 + 4 sum_ {i = 0 } ^ ni + sum_ {i = 0} ^ n 1- (n + 1) ^ 4 #
# 0 = 4 sum_ {i = 0} ^ ni ^ 3 + 6 sum_ {i = 0} ^ ni ^ 2 + 4 sum_ {i = 0} ^ ni + sum_ {i = 0} ^ n 1- (n + 1) ^ 4 #
# 0 = 4S_3 (n) + 6S_2 (n) + 4S_1 (n) + (n + 1) - (n + 1) ^ 4 #
Rozwiązanie dla # S_3 (n) #
# S_3 (n) = ((n + 1) ^ 4- (n + 1) -6S_2 (n) -4S_1 (n)) / 4 #
Tutaj #S_k (n) = sum_ {i = 0} ^ n i ^ k #