Skip to main content
added 24 characters in body
Source Link
user45941
user45941

Haskell, 5246 bytes

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

Try it online!Try it online!

Thanks to flawr for -6 bytes and a great challenge! And thanks to H.PWiz for another -6!

Haskell, 52 bytes

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

Try it online!

Thanks to flawr for -6 bytes and a great challenge!

Haskell, 46 bytes

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

Try it online!

Thanks to flawr for -6 bytes and a great challenge! And thanks to H.PWiz for another -6!

added 45 characters in body
Source Link
user45941
user45941

Haskell, 5852 bytes

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

Try it online!Try it online!

Thanks to flawr for -6 bytes and a great challenge!

Haskell, 58 bytes

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

Try it online!

Haskell, 52 bytes

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

Try it online!

Thanks to flawr for -6 bytes and a great challenge!

Source Link
user45941
user45941

Haskell, 58 bytes

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

Try it online!