Are these devices compatible, or do I need specifically the 2015 model?
They are not compatible, samsung for some reason likes to release completely different phones with almost identical names. The 2016 and 2017 models are somewhat supported by postmarketos, see wiki pages for Samsung Galaxy A5 2016 (samsung-a5xelte) and Samsung Galaxy A5 2017 (samsung-a5y17lte), but way less features work compared to for samsung-a5 2015.
An alternative could be samsung galaxy s3, modem and camera does not work, but apart from that it is pretty usable.
They are not compatible, samsung for some reason likes to release completely different phones with almost identical names. The 2016 and 2017 models are somewhat supported by postmarketos, see wiki pages for Samsung Galaxy A5 2016 (samsung-a5xelte) and Samsung Galaxy A5 2017 (samsung-a5y17lte), but way less features work compared to for samsung-a5 2015.
An alternative could be samsung galaxy s3, modem and camera does not work, but apart from that it is pretty usable.