# Tagged Questions

47 views

### $U(n) =$ the smallest strictly positive integer $k$ such that $2^k-1$ is divisible by the first $n$ primes. What are the first values of $U(n)$?

$U(n) =$ the smallest strictly positive integer $k$ such that $2^k-1$ is divisible by the first $n$ prime numbers (except for the first prime number: $2$). What are the first values of $U(n)$ up to ...
55 views

### Algorithm for finding power

I has been searching for a high precision library in PHP to do calculations like $$232323232323^{121212.2232323232}$$ etc (ie, with very large numbers, including decimals), but failed to get any. ...
2k views

### Fastest way to check if $x^y > y^x$?

What is the fastest way to check if $x^y > y^x$ if I were writing a computer program to do that? The issue is that $x$ and $y$ can be very large.
87 views

### Finding $x^n$ patterns

I noticed the other day while computing consecutive powers of $2$ that for $n \geq 1$, the numbers in the ones place of the values of $2^n$ repeat every 4 terms $(2, 4, 8, 6,\ldots)$. In the tens ...
377 views

### What better way to check if a number is a perfect power?

What better way to check if a number is a perfect power? Need to write an algorithm to check if $n = a^b$ to $b > 1$. There is a mathematical formula or function to calculate this? I do not ...
72 views

### How to calc $a^{2^n}$ mod $m$ in less than O(n) time?

a,m are positive integers. if needed, you can assume m is a prime. Is there any fast algorithm? I'm sorry for my not clear description.
104 views

### Proof of correctness of Putzers algorithm

I have a question regarding the proof (seen below) of Putzers algorithm for matrix exponentiation. It's written by our danish lecturer at the university, so I translated the important parts into ...
173 views

### Power sums, fast algorithm

I know some schemes to compute power sums (I mean $1^k + 2^k + ... + n^k$) (here I assume that every integer multiplication can be done in $O(1)$ time for simplicity): one using just fast algorithm ...
1k views

### How to handle big powers on big numbers e.g. $n^{915937897123891}$

I'm struggling with the way to calculate an expression like $n^{915937897123891}$ where $n$ could be really any number between 1 and the power itself. I'm trying to program (C#) this and therefor ...
40 views

### Formula to scale a series that is being bent with a root / power.

I have a reference number, Rx, and a series of numbers, Sx[], to compare to it. Let's call the output Ox[]. I am using a simple square root to accelerate the apparent difference between the reference ...
171 views

### How can I find $c=d^x$ using only basic computer functions?

Since this seems more like a math question than programming, I'm placing it here instead of on SO I'm trying to find $x$ when $c$ and $d$ are known constants (user input and iteration counter, ...
2k views

231 views

### An exponential function between zero and one

Alrighty, math noob here, so be nice :P. We're building an app and need an exponential function that exists between zero and one, and, depending on the importance we give it, will fluctuate between ...