## dan815 one year ago Modified P.E question: Working from left-to-right if no digit is exceeded and not equal by the digit to its left it is called an increasing number; for example, 134568. Similarly if no digit is exceeded and not equal by the digit to its right it is called a decreasing number; for example, 65420. We shall call a positive integer that is neither increasing nor decreasing a "bouncy" number; for example, 155349. What is the total number of non bouncy numbers? Here is a similar question with more details : https://projecteuler.net/problem=112

1. ganeshie8

.

2. Astrophysics

.

3. ganeshie8

By your modified definition, is the first bouncy number 11 ?

4. dan815

yep that is true

5. Astrophysics

Binary?

6. ganeshie8

nope, i think the question is number system sensitive

7. dan815

hey look at this pattern for the number of none bouncy numbers from 10 digit to 1 digit it follows this patternn

8. dan815

for 10 digit solving the equation a1+a2+a3+....+a9=k , where k E { 9} where a_n >= 1 for 9 digit solving the equation a1+a2+a3+....+a8=k , where k E {9,8,8} for 8 digit solving the equation a1+a2+a3+....+a7=k , where k E {9,8,8,7,7,7} . . .

9. dan815

and then we got this general formula a1+a2+....+an = k a_m >=1 number of solutions to this must result from 1+1+...+(1+k-n)=k #of Solutions=k-n+n-1 choose n-1 =k-1 choose n-1

10. ikram002p

lavosh Danial will see in morning -.-

11. dan815

oh actually it might not be too much work from here to see how many non repeating numbers are there to cover the actual peuler question

12. dan815

|dw:1435712976484:dw|

13. dan815

$\sum_{b=9}^{10} \sum_{m=1}^{b} (10-m)\sum_{k=1}^{m-1} \binom{m-1}{k}$

14. dan815

I am gonna say that for any base 'B' it would be $\sum_{b=B-1}^{B} \sum_{m=1}^{b} (B-m)\sum_{k=1}^{m-1} \binom{m-1}{k}$

15. dan815

oh i found the inner one on wiki hehe theres a nice form to it, i think ive worked on the proof for this one too xD

16. dan815

|dw:1435714315667:dw|

17. xapproachesinfinity

*

18. xapproachesinfinity

the length of number does not matter?

19. dan815

it does the number of non bouncy numbers gets lower and lower for higher digits

20. dan815

its kind of long but this is pretty much closed form $\sum_{b=9}^{10} 10*(2^B-1)-(B-1)*2^B -1 -10B + B*(B+1)/2$