Group Abstract Group Abstract

Message Boards Message Boards

0
|
3.1K Views
|
3 Replies
|
1 Total Like
View groups...
Share
Share this post:

Find original inputs x and ^y for a given product, possible or not?

Posted 10 years ago
POSTED BY: Jason Caldwell
3 Replies
Posted 10 years ago
POSTED BY: David Keith

Hi David,

yes, I had noticed that we were typing at the same time; good that we came up with the same solution.

This one, by the way, also works:

Solve[387381625547900583936 == x*2^y && x \[Element] Integers && y \[Element] Integers, {x, y}]

The solution is:

{{x -> ConditionalExpression[21 2^(64 - y), (21 2^(64 - y) | y) \[Element] Integers]}}

Cheers,

Marco

POSTED BY: Marco Thiel

Hi Jason,

in this particular case the solution is obviously not unique. The following line for example:

FindInstance[387381625547900583936 == x*2^y && x \[Element] Reals && y \[Element] Reals, {x, y}]

finds

{{x -> 84, y -> Log[4611686018427387904]/Log[2]}}

which numerically evaluates to

{{x -> 84., y -> 62.}}

This obviously is a valid solution. Not you also see what the pattern is. All these pairs fulfil your equation:

Table[{387381625547900583936/2^n, n}, {n, 0, 64}]

as can be seen from

#[[1]]*2^#[[2]] & /@ Table[{387381625547900583936/2^n, n}, {n, 0, 64}]

You can of course also get an idea of this behaviour of you use:

FactorInteger[387381625547900583936]

The result

{{2, 64}, {3, 1}, {7, 1}}

tells you that this is 21*2^64.

Cheers,

Marco

POSTED BY: Marco Thiel
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard