Donate to Remove ads

Got a credit card? use our Credit Card & Finance Calculators

Thanks to johnstevens77,Bhoddhisatva,scotia,Anonymous,Cornytiv34, for Donating to support the site

Roots

cinelli
Lemon Slice
Posts: 550
Joined: November 9th, 2016, 11:33 am
Has thanked: 231 times
Been thanked: 160 times

Roots

#514557

Postby cinelli » July 15th, 2022, 11:45 am

I was chatting to a friend about maths and she came up with the surprising assertion that people make too much of a fuss about calculating cube roots. “Take 512 for instance,” she said. “All you have to do is add the digits – 8 – and there you are: the cube root of 512 is 8.” I raised my eyebrows in disbelief. “Or take another example. Add the digits of 17576 to give 26 as the cube root.” I thought she was being rather selective in her examples, but didn’t press the point. Can you find all cases where the cube root of a number is the sum of its digits?

Cinelli

9873210
Lemon Slice
Posts: 986
Joined: December 9th, 2016, 6:44 am
Has thanked: 226 times
Been thanked: 296 times

Re: Roots

#514644

Postby 9873210 » July 15th, 2022, 3:35 pm

cinelli wrote:Can you find all cases where the cube root of a number is the sum of its digits?


Yes

Dod101
The full Lemon
Posts: 16629
Joined: October 10th, 2017, 11:33 am
Has thanked: 4343 times
Been thanked: 7534 times

Re: Roots

#514646

Postby Dod101 » July 15th, 2022, 3:38 pm

cinelli wrote:I was chatting to a friend about maths and she came up with the surprising assertion that people make too much of a fuss about calculating cube roots. “Take 512 for instance,” she said. “All you have to do is add the digits – 8 – and there you are: the cube root of 512 is 8.” I raised my eyebrows in disbelief. “Or take another example. Add the digits of 17576 to give 26 as the cube root.” I thought she was being rather selective in her examples, but didn’t press the point. Can you find all cases where the cube root of a number is the sum of its digits?

Cinelli


It sounds like one of these 'Can you find all the prime numbers?' sort of question. I should imagine that a computer ap could help but whether even it could find 'all' the cases I very much doubt.

Dod

9873210
Lemon Slice
Posts: 986
Joined: December 9th, 2016, 6:44 am
Has thanked: 226 times
Been thanked: 296 times

Re: Roots

#514652

Postby 9873210 » July 15th, 2022, 4:03 pm

Dod101 wrote:
It sounds like one of these 'Can you find all the prime numbers?' sort of question. I should imagine that a computer ap could help but whether even it could find 'all' the cases I very much doubt.

Dod



If A, a positive integer, has N digits, we know it is > 10^(N-1)
The sum of the digits is < 10*N
so A is < 10^3*N^3

We know that exponentials grow faster than powers so there for large numbers there is no solution.
A fairly loose bound is that there are no solutions with 7 or more digits.

This leaves only 100 cases to test, which is well within the bounds of paper and pencil, let alone spreadsheets.
If using paper and pencil it would be worth tightening the bound to save effort.


SteelCamel
2 Lemon pips
Posts: 208
Joined: February 15th, 2017, 5:49 pm
Has thanked: 1 time
Been thanked: 103 times

Re: Roots

#514711

Postby SteelCamel » July 15th, 2022, 9:36 pm

9873210 wrote:This leaves only 100 cases to test, which is well within the bounds of paper and pencil, let alone spreadsheets.

Indeed, but doing so raises two additional interesting questions. There are seven such numbers - the cubes of 0, 1, 8, 17, 18, 26 and 27. There's no reason I can see why those should be the ones that work, though.

More intriguingly, in every other case the process returns an incorrect answer - but not just any answer. The sum of digits differs from the correct cube root by a multiple of 3 in every case I've tried (including the above - zero is a multiple of 3). But is this the case for every number? And if so why?

9873210
Lemon Slice
Posts: 986
Joined: December 9th, 2016, 6:44 am
Has thanked: 226 times
Been thanked: 296 times

Re: Roots

#514716

Postby 9873210 » July 15th, 2022, 10:33 pm

SteelCamel wrote:
9873210 wrote:This leaves only 100 cases to test, which is well within the bounds of paper and pencil, let alone spreadsheets.

Indeed, but doing so raises two additional interesting questions. There are seven such numbers - the cubes of 0, 1, 8, 17, 18, 26 and 27. There's no reason I can see why those should be the ones that work, though.

More intriguingly, in every other case the process returns an incorrect answer - but not just any answer. The sum of digits differs from the correct cube root by a multiple of 3 in every case I've tried (including the above - zero is a multiple of 3). But is this the case for every number? And if so why?


Mod 3 arithmetic.

10 mod 3 = 1
a^3 mod 3 = a mod 3

so
sum( a_n * 10^n ) mod 3 = sum( a_n) mod 3
(sum a_n)^3 mod 3 = sum( a_n) mod 3

so yes true for every number.

Let me know if I need to be more specific at step 2.

cinelli
Lemon Slice
Posts: 550
Joined: November 9th, 2016, 11:33 am
Has thanked: 231 times
Been thanked: 160 times

Re: Roots

#518284

Postby cinelli » July 30th, 2022, 10:45 am

9873210 and SteelCamel have the right method and solution. You can further reduce the amount of searching by tabulating the digital roots of numbers and their cubes:

d(n) d(n^3)
1 1
2 8
4 9
4 1
5 8
6 9
7 1
8 8
9 9

d(n^3) and the sum of digits is very close – in fact they differ by a multiple of 9. Only three satisfy the criterion that d(n) = d(n^3) so in any trial and error search, we can immediately rule out two thirds of candidates. Searching numbers up to 99 gives 1, 8, 17. 18, 26 and 27. There are surprisingly few solutions and it is easy to convince oneself that larger numbers are not feasible.

Cinelli

9873210
Lemon Slice
Posts: 986
Joined: December 9th, 2016, 6:44 am
Has thanked: 226 times
Been thanked: 296 times

Re: Roots

#518326

Postby 9873210 » July 30th, 2022, 2:34 pm

Up thread I said 100 was a loose upper bound. I use a loose bound because I'm lazy. If I'm lazy in a different way (because I have to do a manual search) we can show there are no 6 digit solutions. In the last 40 years computers have really changed what is consider a tractable search space.

(6*9)^3 = 157464 so for any six digit solution the first digit must be 1.
(5*9+1)^3 = 97336 which is only five digits.

So we can reduce the search space to [0,46]

Also you neglected zero. A perfectly good integer, and a fine solution for this problem. Time to leave the FORTRAN, religious persecution, and other baleful influences from the dark ages behind.


Return to “Games, Puzzles and Riddles”

Who is online

Users browsing this forum: No registered users and 9 guests