\documentclass{beamer}
%\def\cleardoublepage{...} <-- how to do this ?
\begin{document}
\frame{this is page 1}
\frame{this is page 2}
\cleardoublepage
\frame{this is page 3} %<-- show in page 3
\cleardoublepage
\frame{this is page 5} %<-- show in page 5
\end{document}
How to write the \def ... ?

\cleardoublepageis used in double sided documents to force the placement of remaining floats (figures,tables etc) and finish everything untill start a new page (ususally a new chapter) from the upcoming empty odd page... So, in beamer something like this would not have an effect. Please be more specific on what you want to achieve... – koleygr Jan 23 '19 at 05:55