function indices = mindices(j,m) 
% This is a headache-saving formula for the jth group of 3^m
% consecutive indices.

indices = (j-1)*3^m+1:j*3^m ;