Simplifying the determinant of the matrix whose $(i,j)$-th entry is $b_i c_j$ for $i=j$ and $-b_i c_j$ for $i\neq j$

For $n\ge 3$ there is a clear pattern. For $n=3$ we have $$ \det(A)=- 4b_1b_2b_3c_1c_2c_3. $$ For $n=4$ we have $$ \det(A)=- 16b_1b_2b_3b_4c_1c_2c_3c_4. $$ So we should have $\det(A)=-f(n)\prod_{i=1}^n b_i\prod_{i=1}^ n c_i$ for all $n\ge 3$ with a positive integer $f(n)$. We have $$ f(3)=4,\; f(4)=16,\; f(5)=48,\; f(6)=128,\; f(7)=320. $$ Conjecture: $f(n)=2^n(n-1)$.


We can write $A = BSC$, where $S$ is the matrix you describe and $$ B = \pmatrix{b_1\\ & b_2 \\ && \ddots\\ &&& b_n}, \quad C = \pmatrix{c_1\\ & c_2 \\ && \ddots\\ &&& c_n}, $$ so that as you noted, we have $\det(A) = \det(B)\det(C) \det(S)$.

In order to compute $\det(S)$, it suffices to note that $$ S = 2I - \pmatrix{1 & \cdots & 1\\ \vdots & \ddots & \vdots \\ 1 & \cdots & 1}, $$ which is to say that $S$ is a rank-one update of a scalar matrix. One method to compute the determinant of such a matrix is by considering its eigenvalues: because $S$ has eigenvalues $2$ with multiplicity $n-1$ and $2-n$ with multiplicity $1$, we compute $$ \det(S) = 2^{n-1}(2-n). $$