Most sources attribute the first use of "function" in the context of mathematics to Leibniz. But D'Alembert, Lacroix and Dini claim the following:
D'Alembert in Encyclopédie 1757:
les anciens géometres, ou plûtôt les anciens analystes ont appellé fonctions d'une quantité quelconque $x$ les différentes puissances de cette quantité.
Lacroix in Traité du calcul différentiel et du calcul intégral 1797, p.1:
Les anciens Analystes comprenoient en général sous la dénomination de fonctions d'une quantité, toutes les puissances de cette quantité.
Dini in Fondamenti per la teorica della funzioni di variabili reali 1878, p.35
Gli antichi usarono dapprima la parola funzione per esprimere le varie potenze du un stessa quantità, e solo da Leibnitz, dai Bernoulli e più specialmente poi da Eulero fu esteso il concetto di funzione [...]
None of them explain who they mean by ancients, but Dini makes it quite clear that he doesn't mean Leibniz. So who were these ancients? The greeks?