I stumbled upon this equation when I was reading:

"Let S(n) be the sum of the digits of the natural number n. Find all natural numbers n that satisfies the equation: 2(S(n))^3+ 7(S(n))^2 + 16 = 3n. "

What I only know after trying this problem many times is that n can't be a one-digit number. Can anybody give me some clues on how I should approach this? ( plz don't spoil me the answers, I just want to know how to solve this)

Hey guys..can u check out this video...i've given a detailed answer..also subscribe and like please.. thank you

Video Link :

https://youtu.be/U6kqobzbv10I only know area under graph man😀

I just want to correct a couple of mistakes.

- Everywhere it says "10^(k-1) > 486 * x ^ 3 - 189 * x^2 - 6 " it should be

"10^(k-1) > 486 * k ^ 3 + 189 * k^2 + 6 "

- "54 * q^3 + 171 * q^2 + 156 * q + 54 = 9 * p " should actually be

"54 * q^3 + 171 * q^2 + 156 * q + 54 = p"

Assume "n" is a k digit number , and let s be the sum of it's digits.

Thus we know that :

1 <= s <= 9*k , because we know n has k digits , the greatest the sum of the digits can be is when all the digits are 9 , and are k of them

and 10^(k-1) <=n , n has k digits

we begin with : 1<=s<=9*k

<=> 2<=2*s^3<=1458*k^3

<=> 7<=7*s^2<=567*k^2

--------------------------- Adding the 2 of them together and with 16

<=> 25<=3*n<=1458*k^3+567*k^2+16 , Appling our given equation .

We divide everting by 3 and remembering that n is a natural number we have

9<= n < 486*k^3 + 189 * k^2 + 6 (1)

But we know that n , being a k digit number , also follows :

10^(k-1) <= n (2)

In the following let's consider the following function :

f(x) = 10^(x-1) - 486 * x^3 - 189 * x^2 - 6

And it's first , second , third and 4-th derivative.

we have

1st f'(x) = ln(10)* (10^(x-1)) - 1458 * x^2 - 378 * x

2nd f''(x) = ln(10)^2 * (10^(x-1)) - 2916* x - 378

3rd f'''(x) = ln(10)^3 * (10 ^(x-1)) - 2916

4th f''''(x) = ln(10) ^ 4 * 10^(x-1)

Notice that the 4-th derivative is always positive , it is a positive constant multiplied with an exponential . That means that the 3rd derivative is increasing on (-inf , inf )

Notice that f'''(4) = ln(10)^ 4 * 10^3 - 2916

Now we know e < 3 then e^2 < 9 < 10

then 2 < ln(10)

16 < ln(10)^4

0 < 16000 - 2916 < ln(10)^4 * 10 ^ 3 - 2916

Since we know the 3rd derivative is always increasing and at x = 4 is bigger then 0 , then we know that f'''(x) > 0 for x >=4

Than means the second derivative is always increasing , when x >=4 .

Notice f''(5) = ln(10)^2 * 10^4- 2916*5 - 378

Applying the same logic as above we have :

2 < ln(10)

0< 40000 - 14580 - 378 < f''(5)

Since we know the second derivative is increasing when x >= 4 and at 5 is bigger then 0 , we know that f''(x) > 0 when x >= 5

Following we have that the first derivative is always increasing when x >= 5

Notice that f'(6) = ln(10) * 10 ^5 - 1458 * 36 - 378 * 6

Again 2 < ln(10)

2 * 100000 - 52488 - 2268 < f'(6)

0 < 145244 < f'(6)

That means f'(x) is increasing when x >= 5 and bigger then 0 at 6 that means that f'(x) is bigger than 0 for all x >=6

That means f is always increasing when x >=6

Notice that f(7) = 10^6 - 486 * 343 - 189 * 49 - 6

f(7) = 1000000 - 166698 - 9261 - 6 = 824035 >0

Since f is increasing when x >= 6 and f(7) > 0 when know that

10^(x-1) - 486 * x^3 - 189 * x^2 - 6 > 0 when x >=7

<=> 10^(x-1) > 486 * x ^ 3 - 189 * x^2 - 6

Returning to our previous topic , we deduced that in order for the equation to hold we have that

9<= n < 486*k^3 + 189 * k^2 + 6 from (1)

and

10^(k-1) <= n from (2)

but for such a number n to exist we have that

10^(k-1) < 486 * k ^ 3 + 189 * k^2 + 6

But we proved above that for any number k , bigger than 7 :

10^(k-1) > 486 * x ^ 3 - 189 * x^2 - 6

9 <= n < 486 * k^3 + 189*k^2 + 6 <=> k <7

so we know our number n has at most 6 digits . In this case : 1 <= s <= 9* 6

1 <= s <= 54

Now , we know that for any number n and it's sum of digits s = S(n) we have :

s ≡ n ( mod 3 ) (3)

This is easily provable noticing that:

n = a0 + a1 * 10^1 + a2 *10 ^2 + ... + am * 10^m

where a0 , a1 , ... , am are the digits of this number

10 ≡ 1 ( mod 3 )

then

n ≡ a0 + a1 + ... + am ≡ s (mod 3)

then given our : 2 * s^3 + 7 * s^2 + 16 = 3 * n ,

everything here is a natural number , since 3 divides the RHS then 3 divides then LHS

2 * s^3 + s^2 + 1 ≡ 0 ( mod 3)

since 16 ≡ 7 ≡ 1 (mod 3 )

2 * s^3 + s^2 ≡ 2 ( mod 3 )

We know that s can only be 0 , 1 or 2 modulo 3 , checking each case

case s ≡ 0 ( mod 3 )

2 * 0 + 0 ≡ 2 ( mod 3 ) , which is nonsense

case s ≡ 1 ( mod 3 )

2 * 1 + 1 ≡ 2 ( mod 3 ) , which is nonsense

case s ≡ 2 ( mod 3 )

2 * 8 + 4 ≡ 16 + 4 ≡ 20 ≡ 2 (mod 3)

Then we know that s ≡ 2 ( mod 3 )

But at previously proved at (3)

s≡ n ≡ 2 ( mod 3)

Then there exists 2 NATURAL number p , and q >= 0 such as

s = 3* q + 2

n = 3 * p + 2

Then , given our equation :

2 * s^3 + 7 * s^ 2 + 16 = 3 * n

Rewriting in terms of p and q:

2 * (3 * q + 2 )^3 + 7 * (3 * q + 2 )^2 +16 = 3 * ( 3 *p + 2 )

2 * (27 * q ^ 3 + 54 * q^2 + 36 * q + 8 ) + 7 * (9 * q^2 + 12 ^ q + 4 ) + 16 = 9 * p + 6

54*q^3 + 108 * q^2 + 72 * q + 16 +

63 * q ^ 2 + 84 * q + 28 + 16 = 9 * p + 6

Adding like terms :

54 * q^3 + 171 * q^2 + 156 * q + 60 = 9 * p + 6

54 * q^3 + 171 * q^2 + 156 * q + 54 = 9 * p

Dividing everything by 9 we have that

6 * q ^ 3 + 19 * q ^ 2 + (156*q)/9 + 6 = 9 * p

We know that p and q are natural numbers and everything in this equation is clearly a natural number , except 156*q/9 , but this also must be a natural number .

Since 9 does not divide 156 , it must divide q

so we knot that

s = 3 * q + 2

and 9 | q

and s <= 54

then 3*q + 2 < = 54

3*q < = 52

q <= 17 , since q is a natural number

But q is a natural number >=0 and <=17 and 9 | q .

There are only 2 such numbers : 0 and 9

if q = 0 then s = 3 * 0 + 2 = 2

then 3 * n = 2 * 2^3 + 7 * 2^2 + 16

3 * n = 16 + 28 + 16 (deja vu)

3* n = 60

n = 20

Verify that S(20) = 2 + 0 = 2 = s

So

n = 20 is a solution

If q = 9 then s = 3 * 9 + 2 = 29

then 3* n = 2 * 29 ^ 3 +7 * 29 ^ 2 + 16

3* n = 48778 + 5887 + 16

n = 18227

Verify that S(18227) = 1 + 8 + 2 + 2 + 7 = 20 != 29 = s

So 18227 is not a solution.

So we have the only solution 20

Sir i am not able to answer but please make a video on this question

Until then I will try to figure out what can be the solution of this

S(n)=n (mod 9) is a good hint. Then it will be easier.