prenyl diphosphate synthase activity [GO_0120531] - Virtual Fly Brain