# [Haskell], 58 bytes

<!-- language-all: lang-hs -->

    f!g= \n->sum$map(((*).f.div n)<*>g)[i|i<-[1..n],mod n i<1]

[Try it online!][TIO-jokicta7]

[Haskell]: https://www.haskell.org/
[TIO-jokicta7]: https://tio.run/##BcFLDkAwFAXQuVVciUErNGliWDaCQanPC31EMbL3Ome1YZv2PcY5XWp0XDbh8Zm3pxAil2pWjl6wNHmzyJY@MmWrleK@8IcDg4zuo7fEqOGOBDgv4hsZhB1CGp5xlNBVFX8 "Haskell – Try It Online"