Let g : N → N , g ( n ) equals the product of the digits of n (in decimal notation).
Find the sum of all n such that n 2 − 1 2 n + 3 6 = g ( n ) .
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.
You said we know g ( n ) is always less than n . But you should prove it.
@Kazem Sepehrinia can you prove it.
Same way upvotes !!!
Let n = a k a k − 1 . . . a 1 be a k -digit number, thus n = 1 0 k − 1 a k + 1 0 k − 2 a k − 1 + . . . + 1 0 a 2 + a 1 Observe that g ( n ) = a 1 a 2 . . a k − 1 a k ≤ 9 k − 1 a k ≤ 1 0 k − 1 a k ≤ 1 0 k − 1 a k + 1 0 k − 2 a k − 1 + . . . + 1 0 a 2 + a 1 = n Therefore g ( n ) ≤ n . Now for this problem we have n 2 − 1 2 n + 3 6 = g ( n ) ≤ n ⟹ n 2 − 1 3 n + 3 6 ≤ 0 ⟹ ( n − 4 ) ( n − 9 ) ≤ 0 Hence 4 ≤ n ≤ 9 . Equality occurs when n = 4 , 9 .
Problem Loading...
Note Loading...
Set Loading...
n 2 − 1 2 n + 3 6 = g ( n ) g ( n ) = ( n − 6 ) 2
We know product of digits of a number can not exceed the number itself
So, n ≥ g ( n ) n − 6 ≥ g ( n ) − 6 ( n − 6 ) 2 ≥ ( g ( n ) − 6 ) 2 g ( n ) ≥ ( g ( n ) ) 2 − 1 2 g ( n ) + 3 6 ( g ( n ) ) 2 − 1 3 g ( n ) + 3 6 ≤ 0 ( g ( n ) − 4 ) ( g ( n ) − 9 ) ≤ 0
It implies 4 ≤ g ( n ) ≤ 9
It can be easily checked and the only two solutions will be 4 , 9