Difference on montgomery curve equation between EFD and RFC7748
This is not a bug: it arises from different choice of sign in the definition of a24 := (a ± 2)/4; the RFC uses - while the EFD uses +.

RFC, following the Curve25519 paper:


  The constant a24 is (486662 - 2) / 4 = 121665 for curve25519/X25519 and (156326 - 2) / 4 = 39081 for curve448/X448.


EFD, following Montgomery's paper (paywall-free):


  Assumptions: 4*a24=a+2.


This apparent discrepancy was raised by Paul Lambert on the CFRG mailing list during discussion on the draft.  It doesn't really matter which one you choose, as long as you're consistent about it!