Primary Index can be dense/sparse there is no restriction, but sparse is preferred in order to reduce the average memory references.
Clustered index always have to be sparse because the indexing is done on non-key ordered attribute, the values will be repeated, there is no point in using dense index. so indexing is always sparse in this case.
Secondary index on data files is dense where as it is sparse on index files. assume first level has the data blocks which are unordered, so dense index will be used. but whereas in second level, index blocks are present which are ordered and uses key attribute. so sparse index is used