this is the code, IO would like the output to be reversed.
public static ArrayList<Integer> MakeSequenceAL(int N){ ArrayList<Integer> z=new ArrayList<Integer>();
if (N < 1){ return(z);
} else {
int i, j;
for(i = N; i >= 1; --i){
for(j = 1; j <= i; j++){
z.add(i); }
}
return(z); }
}
}