Generalized Lucas wavelets (GLWs) have two more parameters (alpha$$ \alpha $$ and beta$$ \beta $$), comparing with some existing classical wavelet functions. In this manner, we have different types of wavelet functions (orthogonal and non-orthogonal) by choosing various values of parameters alpha$$ \alpha $$ and beta$$ \beta $$. Due to the impressive feature of the GLWs, we design a new computational method for the solution of fractional optimal control problems and fractional pantograph optimal control problems. This technique uses the GLWs and least squares method. The scheme includes expanding the required functions using GLW elements. We present new Riemann-Liouville and pantograph operational matrices for GLWs. Applying the operational matrices and least squares method, the considered problems lead to systems of algebraic equations, which can be solved numerically. A brief discussion of the error of the estimate used is investigated. Finally, some numerical experiments are exhibited to demonstrate the validity and applicability of the suggested scheme. The proposed algorithm is easy to implement and presents very accurate results. In this paper, we designed a new numerical method based on the generalized Lucas wavelet functions for solving two classes of optimal control problems, fractional optimal control problems and fractional pantograph optimal control problems. Generalized Lucas wavelets (GLWs) have two more parameters (alpha and beta) compared with some existing classical wavelet functions. In this manner, we have different types of wavelet functions (orthogonal and non-orthogonal) by choosing various values of parameters (alpha and beta). image