Projecting infinite time series graphs to finite marginal graphs using number theory