Solution (source code)

= Solution

Use the supplied polynomial as an effective-atomic-number approximation for the alloys. Interpreting each quoted <phosphorus> number as an <atomic fraction> $x_P=N_P/(N_P+N_{\rm Ni})$,
$$
\bar Z=(1-x_P)28+x_P15=28-13x_P,
\qquad C_Z=\frac{|\eta(79)-\eta(\bar Z)|}{\eta(79)}.
$$
The <gold> reference yield is $\eta(79)=0.486996$. Substitution gives:

|| Layer
|| Effective <atomic number>
|| Backscatter yield
|| Contrast relative to <gold>

| Au
| $79$
| $0.486996$
| \b[$0$]

| Cu
| $29$
| $0.302417$
| \b[$0.3790$]

| NiP$_x$
| $25.79$
| $0.277764$
| \b[$0.4296$]

| NiP$_y$
| $24.75$
| $0.269247$
| \b[$0.4471$]

| NiP$_z$
| $26.70$
| $0.285001$
| \b[$0.4148$]

The ordering is <gold> brightest, then <copper>, NiP$_z$, NiP$_x$ and NiP$_y$. The phosphorus-rich layer has the lowest effective <atomic number>.

There is a wording ambiguity in “<atomic fraction> of P relative to Ni.” If those numbers instead mean $r=N_P/N_{\rm Ni}$, first convert $x_P=r/(1+r)$, giving $\bar Z=(28+15r)/(1+r)$. The three alloy contrasts then become \b[$0.4243$, $0.4361$, $0.4129$], respectively. The qualitative ordering is unchanged. Both calculations explicitly use $\eta(\bar Z)$; this simple alloy approximation is not a full electron-transport simulation.