Call Back In Union All Within the With-As-Table Itself
This is a Recursive Common Table Expression or Recursive CTE. 

References:
Official documentation for SQL Server
(they are supported by other databases too)
A tutorial and another one, both from a very quick Google search so you might find better with more effort now you know the right terms to search for.