  Let $R$ be a commutative ring with identity and $S$ a multiplicatively closed
subset of $R$. This paper aims to introduce the concept of $S$-$n$-ideals as a
generalization of $n$-ideals. An ideal $I$ of $R$ disjoint with $S$ is called
an $S$-$n$-ideal if there exists $s\in S$ such that whenever $ab\in I$ for
$a,b\in R$, then $sa\in\sqrt{0}$ or $sb\in I$. The relationship among $S$%
-$n$-ideals, $n$-ideals, $S$-prime and $S$-primary ideals are clarified.
Several properties, characterizations and examples are presented such as
investigating $S$-$n$-ideals under various contexts of constructions including
direct products, localizations and homomorphic images. Furthermore, for $m\in%
%TCIMACRO{\U{2115} }% %BeginExpansion \mathbb{N} %EndExpansion $ and some
particular $S$, all $S$-$n$-ideals of the ring $% %TCIMACRO{\U{2124} }%
%BeginExpansion \mathbb{Z} %EndExpansion _{m}$ are completely determined. The
last section is devoted for studying the $S$-$n$-ideals of the idealization
ring and amalgamated algebra.
