<SYSTEM_TASK:>
Given the following text problem statement, write Python code to implement the functionality described below in problem statement
<END_TASK>
<USER_TASK:>
Problem:
I have a time-series A holding several values. I need to obtain a series B that is defined algebraically as follows:
<ASSISTANT_TASK:>
Python Code:
import numpy as np
import pandas as pd
A = pd.Series(np.random.randn(10,))
a = 2
b = 3
B = np.empty(len(A))
for k in range(0, len(B)):
    if k == 0:
        B[k] = a*A[k]
    else:
        B[k] = a*A[k] + b*B[k-1]
<END_TASK>