def A_array(l1,l2,PA,PB,CP,g):
    """
    THO eq. 2.18 and 3.1

    >>> A_array(0,0,0,0,0,1)
    [1.0]
    >>> A_array(0,1,1,1,1,1)
    [1.0, -1.0]
    >>> A_array(1,1,1,1,1,1)
    [1.5, -2.5, 1.0]
    """
    Imax = l1+l2+1
    A = [0]*Imax
    for i in range(Imax):
        for r in range(int(floor(i/2)+1)):
            for u in range(int(floor((i-2*r)/2)+1)):
                I = i-2*r-u
                A[I] = A[I] + A_term(i,r,u,l1,l2,PA,PB,CP,g)
    return A
THO eq. 2.18 and 3.1

    >>> A_array(0,0,0,0,0,1)
    [1.0]
    >>> A_array(0,1,1,1,1,1)
    [1.0, -1.0]
    >>> A_array(1,1,1,1,1,1)
    [1.5, -2.5, 1.0]