I have an array A = [1,2,3] I need to find the array B[i] with the below statement. calculation i did:
B[0] = A[1] + F[0]
1 + F[0] = 1+0=2 hence B=[1]
1 + F[1] = 1+2=3 hence B=[1,2]
1 + F[2] = 1+3=4 hence B=[1,3,4] but the ans is [1,3,5] how?
0
F[0] = Σ A[2 * (0/2)] = A[0]=0 since array A is 1 based index
j=2
1
F[1] = Σ A[2 * (1/2)] = A[1]= 2
j=2
2
F[2] = Σ A[2 * (2/2)] = A[2]= 2
j=2
B[i] = A[1] + F[i]
F[i] = 0,1 <= i < k
i
F[i] = Σ A[k * (j/k)]
j=k
where A=[1,2,3] // 1 based index
k=2
what is the value of B
2026-03-25 16:38:35.1774456715