Skip to main content
1 of 3
Giuseppe
  • 28.8k
  • 3
  • 31
  • 105

R, 25 bytes

function(n,d)sum(n*3:5)-d

Try it online!

An anonymous function; returns the value.

Giuseppe
  • 28.8k
  • 3
  • 31
  • 105