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
.
.
By your modified definition, is the first bouncy number 11 ?
yep that is true
Binary?
nope, i think the question is number system sensitive
hey look at this pattern for the number of none bouncy numbers from 10 digit to 1 digit it follows this patternn
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} . . .
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
lavosh Danial will see in morning -.-
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
|dw:1435712976484:dw|
Join our real-time social learning platform and learn together with your friends!