Can You Simplify Large Numbers into Integers with Minimal Remainder?

  • Thread starter therogerwilco
  • Start date
In summary, the conversation discusses the easiest route to acquiring a int^int +/- remainder result from a large number, with the goal being to get the nearest int^int combo and minimal remainder. Various methods and strategies are suggested, including constraining the problem and breaking up the large numbers into smaller ones. The conversation also delves into finding the density of numbers that are better approximated by a nonsquare than a square. Ultimately, the conversation concludes with a solution and the acknowledgement of the helpfulness of the discussion.
  • #1
therogerwilco
2
0
New here, quick thought :)

Well, this is probably an easy question, but I've been out of school for some time though until recently.
I figured I'ld ask it here cause physics junkies > math junkies :)

What would be the easiest route towards aquiring a int^int +/- remainder result from a fairly large number, in the billions +.
So, if given the number

345,231,234,564,234

It would give the solution (pretend the math is right)

4^34 with a remainder of -342
which would equate to, 4 to the 34th, minus 342.
the remainder can be positive or negative, but the goal is to get the nearest int^int combo, with minimal remainder...

lol

thank for any help that might be had :)
 
Mathematics news on Phys.org
  • #2


Well, 345,231,234,564,234^1 would work, of course, but I don't think that's what you're looking for. I think you need to constrain the problem a bit more, since it might happen that the number is close to a square or a cube or something like that, and so the result wouldn't reduce the complexity as much as you might want. eg: 974,559,891,205 = 987198^2 + 1
 
  • #3


Does it need to be the very best, or just 'good'?

I imagine you're requiring the exponent to be more than 1. Actually, let me try to specify it and have you tell me what's wrong, if anything:

Given a (large) number n, find a > 0, b > 1, and c so that

[tex]a^b+c=n[/tex]

where a, b, and c are integers, and |c| is [small].

(Replace [small] with [minimal] if desired.)Now, does it bother you that b will be 2 fairly often? For example, I tested 10,000 values around 4e25, and I found that all 10,000 had exponent 2. I found the same thing with 100,000 numbers around your number.
 
Last edited:
  • #4


maze said:
Well, 345,231,234,564,234^1 would work, of course, but I don't think that's what you're looking for. I think you need to constrain the problem a bit more, since it might happen that the number is close to a square or a cube or something like that, and so the result wouldn't reduce the complexity as much as you might want. eg: 974,559,891,205 = 987198^2 + 1

I agree. The best form for the example given (with exponent > 1) is
18580399^2 + 7565033
which isn't less complicated at all.

If you constrain the exponent to be at least 3, the remainder term grows significantly larger:
70151^3 + 6742911283
 
  • #5


You could keep applying CR's idea, might get something interesting. eg
n = (((a^b + c)^d + e)^f + g)
 
  • #6


maze said:
You could keep applying CR's idea, might get something interesting. eg
n = (((a^b + c)^d + e)^f + g)

Just keep busting up those big numbers. :)

I could post my Pari code here, if anyone wants it, but it's not that great -- it could be much faster in a compiled language (> 5x), and could be algorithmically improved for the case of testing many sequential numbers (> 10x improvement at least, but only when testing thousands-millions of numbers).

I'm trying to get a count of the densities of numbers which are better approximated by a nonsquare than by a square. So far I have 2, 7, 100, 941, 5168, 38294, ... such numbers for 1, 2, 3, 4, 5, 6, ... digits. The densities are dropping off, though not as quickly as I'd hoped. For larger numbers of digits, even with the improvements above, I'd have to use random sampling to get a good idea, since it's taking too long as it is.
 
  • #7


You could keep going and going until everything is 1's, (), *, +, ^.

eg:
95
= 3^4+13
= (2+1)^(2^2)+(3^3+4)
= ((1+1)+1)^((1+1)^(1+1))+((2+1)^(2+1)+(2^2))
= ((1+1)+1)^((1+1)^(1+1))+(((1+1)^1+1)^((1+1)+1)+((1+1)^(1+1)))
 
  • #8


maze said:
You could keep going and going until everything is 1's, (), *, +, ^.

eg:
95
= 3^4+13
= (2+1)^(2^2)+(3^3+4)
= ((1+1)+1)^((1+1)^(1+1))+((2+1)^(2+1)+(2^2))
= ((1+1)+1)^((1+1)^(1+1))+(((1+1)^1+1)^((1+1)+1)+((1+1)^(1+1)))

From there you could drop the 1s since they're redundant at that point:
(++)^((+)^(+))+(((+)^+)^((++)+((+)^(+)))

Or even write it in RPN. There's a funny way to compress numbers.
 
  • #9


Ahh excellent, tyvm for the help fellas :)
The problems look much more do-able now lol
 
  • #10


Glad we could help. As a general rule, take the whole number closest to the square root; squared, that should give a small absolute remainder.
 

FAQ: Can You Simplify Large Numbers into Integers with Minimal Remainder?

What is the meaning of "New here, quick thought"?

The phrase "New here, quick thought" can have different meanings depending on the context. It could refer to someone who is new to a particular place or situation and has a sudden idea or opinion to share. It could also be used as a way to introduce oneself and share a brief thought or question in a conversation.

Is "New here, quick thought" a commonly used phrase?

It is not a commonly used phrase in everyday language, but it can be seen in informal conversations or online discussions. It is also often used as a caption for social media posts.

How can "New here, quick thought" be interpreted in a scientific context?

In a scientific context, "New here, quick thought" could refer to a new or emerging idea or theory that someone wants to share with their peers. It could also be used to introduce a new perspective or approach to a particular research topic.

Is there any scientific research related to the phrase "New here, quick thought"?

There is no specific scientific research related to this phrase, but there may be studies that touch upon the concept of new and quick thinking or idea generation. However, it is not a commonly studied topic in the scientific community.

Can "New here, quick thought" be used in a formal setting?

No, it is not appropriate to use this phrase in a formal setting such as a professional conference or academic presentation. It is more commonly used in casual or informal conversations.

Similar threads

Replies
2
Views
2K
Back
Top