2018-09-30 22:01:58 +00:00
---
id: 5900f3dd1000cf542c50fef0
title: 'Problem 113: Non-bouncy numbers'
2020-11-27 18:02:05 +00:00
challengeType: 5
2019-08-05 16:17:33 +00:00
forumTopicId: 301739
2018-09-30 22:01:58 +00:00
---
2020-11-27 18:02:05 +00:00
# --description--
2018-09-30 22:01:58 +00:00
Working from left-to-right if no digit is exceeded by the digit to its left it is called an increasing number; for example, 134468.
2020-11-27 18:02:05 +00:00
2018-09-30 22:01:58 +00:00
Similarly if no digit is exceeded by the digit to its right it is called a decreasing number; for example, 66420.
2020-11-27 18:02:05 +00:00
2018-09-30 22:01:58 +00:00
We shall call a positive integer that is neither increasing nor decreasing a "bouncy" number; for example, 155349.
2020-11-27 18:02:05 +00:00
As n increases, the proportion of bouncy numbers below n increases such that there are only 12951 numbers below one-million that are not bouncy and only 277032 non-bouncy numbers below 1010.
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
How many numbers below a googol (10100) are not bouncy?
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
# --hints--
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
`euler113()` should return 51161058134250.
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
```js
assert.strictEqual(euler113(), 51161058134250);
2018-09-30 22:01:58 +00:00
```
2020-11-27 18:02:05 +00:00
# --seed--
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
## --seed-contents--
2018-09-30 22:01:58 +00:00
```js
function euler113() {
2020-09-15 16:57:40 +00:00
2018-09-30 22:01:58 +00:00
return true;
}
euler113();
```
2020-11-27 18:02:05 +00:00
# --solutions--
2018-09-30 22:01:58 +00:00
```js
// solution required
```