All Questions

Filter by
Sorted by
Tagged with
56
votes
2answers
5k views

What is so special about Prime?

When we try to evaluate Prime on big numbers (e.g. 10^13) we encounter the following issue: ...
16
votes
1answer
206 views

Is it better to completely forget about the existence of PowersRepresentations?

I noticed that in several cases the performance of PowersRepresentations is hugely worse than that of IntegerPartitions. (Mma 10....
12
votes
8answers
2k views

Find the minimum integer r such that $(10^r - 1)/37$ is an integer

I know Element[(10^r - 1)/37, Integers] tests the condition. So what is the command that gives me the minimum integer value r ...
8
votes
5answers
412 views

Does Mathematica have a twin prime equivalent of `PrimePi`?

Well, it's all there in the title! I'd like to be able to plot the number of twin primes =<x. Is there an inbuilt function that can do this?
6
votes
1answer
1k views

Evaluate continued fraction

Mathematica has the ContinuedFraction[] function to give the continued fraction expansion of a rational (or approximation of a real) number. I'm interested in the ...
5
votes
1answer
41 views

Abelianness-forcing number Q

In the theory of finite abstract group, abelianness-forcing number $n$ is characterized as a positive integer with standard factorization $n=p_1^{k_1}p_2^{k_2}\cdots p_r^{k_r}$ with $k_i \le 2$ and $...
3
votes
2answers
814 views

Determining if a number is divisible by 1000 [closed]

I have a number such as: a = 875952; And I want to find if it is divisible by 1000. Is there a concise way of doing that?
3
votes
3answers
244 views

What is the formula for this numerical series?

I'm developing a questions game. My goal is that the score for each correct answer will increase as the user answers more questions. Initially there are 15 points for each correct answer. Every 4 ...
3
votes
2answers
216 views

Can Mathematica return the first few terms of a sequence given the first few terms of a Dirichlet Generating Function?

For example: a = Sum[1/n^s, {n, 1, 6}]; Expand[a^2] returns a big mess. I want to see something like: $$1/1^s + 2/2^s + 2/3^s + 3/4^s + 2/5^s + 4/6^s + \cdots ...
3
votes
1answer
110 views

Where is the Chebyshev function of the second kind in Mathematica/Alpha?

I need to perform some computations involving the Chebyshev function of the second kind (sometimes also called the summatory Von Mangoldt function) $\psi(x)$, defined as $$\psi(x) = \sum_{n\le x} \...
3
votes
1answer
83 views

A function about prime gaps

I want to define a $f$ function on Mathematica such as this. $f[k]$ gives the smallest $m$ holds $2k=Prime[m+1]-Prime[m]$. For example, $$f[1]=2$$ $$f[2]=4$$ $$f[3]=9$$ $$f[4]=24$$ How can i do that?...
1
vote
1answer
88 views

Number-theoretic function using Table

I'm trying to make a function to calculate the Log sum of primes over a limited range $1/2n$ to $n$ or Chebychev theta function over limited range $1/2n$ to $n$. This will be used only for even ...
0
votes
2answers
176 views

Powers of prime factors of a positive integer $n$ in “Mathematica”?

I would like to find the powers of a prime in the unique prime factorization of an $n$. I want a function $f[n,p]$ such that $n,p$ are given and I need to know what the power of $p$ is. For instance ...
0
votes
5answers
94 views

Sum Over Solutions to an Equation

Two Related Questions Is there any general built-in functionality for computing a sum over solutions to an equation? This is common in number theory. For example, computing sums of the following form....
0
votes
1answer
39 views

Reverse the reccurence mirrorwise

Let be a recurrence for polynomials $R_{m,j}$ ...
0
votes
0answers
74 views

Find the maximum of a function involved with Floor function

My function is $$ f(H,p) = \left\lfloor \dfrac{\lfloor H/p\rfloor + 3 - \sqrt{(\lfloor H/p\rfloor + 1)^2 - 4H}}{2} \right\rfloor $$ The constraints are $ H \geq p(4p-1) $, $ p $ is prime although ...