  We prove Feigin-Frenkel type dualities between subregular W-algebras of type
A, B and principal W-superalgebras of type $\mathfrak{sl}(1|n),
\mathfrak{osp}(2|2n)$. The type A case proves a conjecture of Feigin and
Semikhatov. Let $(\mathfrak{g}_1,\mathfrak{g}_2) =
(\mathfrak{sl}_{n+1},\mathfrak{sl}(1|n+1))$ or $(\mathfrak{so}_{2n+1},
\mathfrak{osp}(2|2n))$ and let $r$ be the lacity of $\mathfrak{g}_1$. Let k be
a complex number and $\ell$ defined by $r(k+h^\vee_1)(\ell+h^\vee_2)=1$ with
$h^\vee_i$ the dual Coxeter numbers of the $\mathfrak g_i$. Our first main
result is that the Heisenberg cosets $\mathcal C^k(\mathfrak g_1)$ and
$\mathcal C^\ell(\mathfrak g_2)$ of these W-algebras at these dual levels are
isomorphic, i.e. $\mathcal C^k(\mathfrak g_1) \simeq \mathcal C^\ell(\mathfrak
g_2)$ for generic k. We determine the generic levels and furthermore establish
analogous results for the cosets of the simple quotients of the W-algebras.
  Our second result is a novel Kazama-Suzuki type coset construction: We show
that a diagonal Heisenberg coset of the subregular W-algebra at level $k$ times
the lattice vertex superalgebra $V_{\mathbb Z}$ is the principal W-superalgebra
at the dual level $\ell$. Conversely a diagonal Heisenberg coset of the
principal W-superalgebra at level $\ell$ times the lattice vertex superalgebra
$V_{\sqrt{-1}\mathbb Z}$ is the subregular W-algebra at the dual level k. Again
this is proven for the universal W-algebras as well as for the simple
quotients. We show that a consequence of the Kazama-Suzuki type construction is
that the simple principal W-superalgebra and its Heisenberg coset at level
$\ell$ are rational and/or C_2-cofinite if the same is true for the simple
subregular W-algebra at dual level $\ell$. This gives many new C_2-cofiniteness
and rationality results.
