How many Ascending Numbers there are?

"Ascending Number" is a positive integer that the n + 1 n+1 th digit is always same or larger than the n n th digit. (In 5680 5680 , the 1 1 st digit is 5 5 , and the 4 4 th digit is 0 0 .)

Let's define the number of Ascending Number s that has 1 0 7 10^7 digits is p p .

What is the last 9 digits of p p ?


The answer is 455750001.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Mark Hennings
Jan 7, 2019

No ascending number with N N digits can contain the digit 0 0 , since 0 0 is the smallest of the digits, and this would mean that the ascending number would then begin with 0 0 , which would make it a number with fewer than N N digits. Thus ascending numbers can only contain the digits 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 1,2,3,4,5,6,7,8,9 . The number of ascending numbers with N N digits is therefore the number of 9 9 -tuples ( a 1 , a 2 , . . . , a 9 ) (a_1,a_2,...,a_9) of integers such that a 1 , a 2 , . . . , a 9 0 a_1,a_2,...,a_9 \ge 0 and a 1 + a 2 + + a 9 = N a_1 + a_2 + \cdots + a_9 = N (so that the ascending number consists of a 1 a_1 copies of 1 1 , a 2 a_2 copies of 2 2 , and so on, up to a 9 a_9 copies of 9 9 , written in that order.

Standard combinatorics tells us that the number of ascending numbers with N N digits is p N = ( 8 + N N ) p_N \; = \; \binom{8+N}{N} Thus we want to find p 1 0 7 ( m o d 1 0 9 ) p_{10^7} \pmod{10^9} . Since p 1 0 7 = ( 1 0 7 + 8 1 0 7 ) = 2480167658743700408075402393106827480451696455750001 \begin{aligned} p_{10^7} & = \; \binom{10^7+8}{10^7} \\ & = \; 2480167658743700408075402393106827480451696455750001 \end{aligned} this makes the answer 455750001 \boxed{455750001} .

Thank you for uploading a solution to my problem!!!

Kim Eric - 2 years, 5 months ago
Lamer Zhang
Feb 3, 2019

We consider the continuous digits which share the same number one block. there are at least 1 block and at most 9 block in the sequence. Suppose there are n n digits and m m blocks. for block=1, we can fill in 9 numbers, and there's no "paddle" to break it into several blocks.

i.e. ( 9 1 ) ( n 1 0 ) \binom{9}{1}*\binom{n-1}{0}

for block=2, we can fill in 9 numbers in 2 blocks, and there's one "paddle" to break it into 2 parts, which can be put into n 1 n-1 places.

i.e. ( 9 2 ) ( n 1 1 ) \binom{9}{2}*\binom{n-1}{1}

by the same token, for block= m m ( 1 m 9 ) (1 \leq m \leq 9 ) , we can fill in 9 numbers in m m blocks, and there's m 1 m-1 "paddles" in n 1 n-1 places to break into m m parts.

i.e. ( 9 m ) ( n 1 m 1 ) \binom{9}{m}*\binom{n-1}{m-1}

so the answer is:

m = 1 9 ( 9 m ) ( n 1 m 1 ) \sum_{m=1}^9 \binom{9}{m}*\binom{n-1}{m-1} m o d 1 0 9 mod 10^9

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...