2018-10-10 18:03:03 -04:00
---
id: 5900f4861000cf542c50ff98
2021-02-06 04:42:36 +00:00
title: 'Problem 281: Pizza Toppings'
2018-10-10 18:03:03 -04:00
challengeType: 5
2021-02-06 04:42:36 +00:00
forumTopicId: 301932
2021-01-13 03:31:00 +01:00
dashedName: problem-281-pizza-toppings
2018-10-10 18:03:03 -04:00
---
2020-12-16 00:37:30 -07:00
# --description--
2021-02-06 04:42:36 +00:00
You are given a pizza (perfect circle) that has been cut into m·n equal pieces and you want to have exactly one topping on each slice.
2020-02-18 01:40:55 +09:00
2021-02-06 04:42:36 +00:00
Let f(m,n) denote the number of ways you can have toppings on the pizza with m different toppings (m ≥ 2), using each topping on exactly n slices (n ≥ 1). Reflections are considered distinct, rotations are not.
2020-02-18 01:40:55 +09:00
2021-02-06 04:42:36 +00:00
Thus, for instance, f(2,1) = 1, f(2,2) = f(3,1) = 2 and f(3,2) = 16. f(3,2) is shown below:
2020-02-18 01:40:55 +09:00
2021-02-06 04:42:36 +00:00
Find the sum of all f(m,n) such that f(m,n) ≤ 1015.
2018-10-10 18:03:03 -04:00
2020-12-16 00:37:30 -07:00
# --hints--
2018-10-10 18:03:03 -04:00
2021-02-06 04:42:36 +00:00
`euler281()` should return 1485776387445623.
2018-10-10 18:03:03 -04:00
```js
2020-12-16 00:37:30 -07:00
assert.strictEqual(euler281(), 1485776387445623);
2018-10-10 18:03:03 -04:00
```
2021-01-13 03:31:00 +01:00
# --seed--
## --seed-contents--
```js
function euler281() {
return true;
}
euler281();
```
2020-12-16 00:37:30 -07:00
# --solutions--
2020-08-13 17:24:35 +02:00
2021-01-13 03:31:00 +01:00
```js
// solution required
```