A new class of polynomials associated with Bernstein and beta polynomials