Questions on the number-theoretic functionality of Mathematica.

learn more… | top users | synonyms

0
votes
2answers
79 views

Testing the Erdos square free conjecture

Can someone please answer these two parts of my homework assignment? Adding an explanation would be appreciated! a. Test the Erdos square free conjecture for $n <= 30000$. You should use ...
-1
votes
0answers
17 views

Application of Fermat's little theorem [migrated]

show that a^13≡a(mod 35) using Fermat's little theorem. Use Fermat's little theorem with primes 5 and 7.
0
votes
0answers
68 views

Elliptic curve cryptography in Mathematica

I can find no resources for doing elliptic curve cryptography. I have used the finite field package, but I find it cumbersome and it does not seem to have any builtin methods for ECC. How can I get ...
0
votes
1answer
26 views

Square root of a value defined in a finite field?

I am trying to find the right way to compute the square root of a number defined in a finite field. For example, ...
3
votes
1answer
74 views

How to calculate the residue of $1/f(z)$ at a numerical approximation to a root of $f(z)$?

The input Residue[1/DirichletL[19,10,s],{s,s0}] gives 0 even when s0 is a root. For ...
4
votes
0answers
79 views

Simplifying expressions involving Divisible

FullSimplify[ Divisible[p^2 - 1, 24] , Element[p, Primes] && p > 3] Should evaluate to True, but I get ...
2
votes
2answers
98 views

Checking if a number is a perfect power

I wanted to know how would I use Mathematica in order to check if the number is a perfect power I saw the algorithm but couldn't grasp it enough to implement it, so can anybody help?
2
votes
2answers
115 views

FactorInteger over UFDs

How can I factor 'integers' over other quadratic number fields (not just gaussian integers). For instance, how could I factor $7 = (3 + ω)(2 − ω)$ over Eisenstein integers ($ω = \frac{-1+ I ...
9
votes
4answers
1k views

Semi prime numbers

The high school textbook I am using has the example of semi-prime numbers. They wanted students to find (by "perspiration") all the semi-prime numbers less than $50$ (for a question on set theory). ...
1
vote
3answers
181 views

Generating a list of cubefree numbers

I am trying to generate a list of cubefree numbers (i.e. numbers when prime factorized contain no tripled factors) within a given range. Of DivisorSigma, ...
11
votes
6answers
1k views

How to find lattice points on a line segment?

How do I find points on the line segment joining {-4, 11} and {16, -1} whose coordinates are positive integers?
1
vote
1answer
237 views

Faster GCD Implementation

Is there any chance to write a faster GCD than the built-in one in Mathematica? @Mr.Wizard has written one in this question (although it's not for this purpose) which is 6 times slower on a 100k ...
7
votes
4answers
249 views

Generate PrimePower counting function

Is there a way to generate a counting function for prime powers - i.e. to create a similar function to PrimePi, but including prime powers. The following will, of ...
1
vote
1answer
89 views

Question about number theory

Let S[p] denote the sum of digits of p. A prime p is said to be stubborn if none of ...
3
votes
1answer
113 views

Negative Continued Fraction of a Rational

The $n^{\text{th}}$ negative continued fraction convergent $x_n$ of a positive real $x$ is computed by the nested function \begin{align} x_n = k_1 - \frac{1}{k_2 - \frac{1}{k_3 - \dots - ...
3
votes
1answer
197 views

Von Mangoldt function

Can anybody evaluate the following sum for me $$ \sum\limits_{n=2}^\infty(-1)^n\left(\frac{\psi(n)}{n}-\frac{\Lambda(n)}{2n}\right) $$ where $\psi(n)$ is the Chebyshev function and $\Lambda(n)$ is ...
0
votes
0answers
69 views

How can I calculate all irreducible polynomials of 31 degree in $\mathbb Z_2[x]$?

How can I calculate all binary irreducible polynomials of degree 31? or how i calculate all irreducible $f$ in $\mathbb Z_2[x]$? (The irreducible polynomial in $\mathbb Z_2[x]$ and $\mathbb R$ are ...
1
vote
3answers
137 views

Number theory: Problem involving rational numbers

Use RandomRat to test whether ((-1)^(1/Denominator[q]))^Numerator[q] is identical with ...
2
votes
4answers
272 views

Perfect numbers

The question given to me: a. Find the perfect numbers between $1$ and $10^6$ b: Find the abundant numbers between $1$ and $1000$ For a, I wrote ...
3
votes
3answers
170 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 ...
0
votes
0answers
60 views

Is mathematica able to count all results?

I have N variables, say $V_1, V_2, ..., V_n$. and I have several logical conditions like $[(V_1 > V_2) \cap (V_2 + V_3 > V_1) \cap (V_1*V_1 > 2*V_2)] \cup [..]$ You can consider they are in ...
10
votes
5answers
465 views

Double series over primes

I'm very curious if the following double series over primes has a closed form: $$\sum_{k \in \mathcal{P}}\sum_{n \in \mathcal{P}}\frac{1}{k\;n(k+n)^2}$$ where $\mathcal{P}$ denotes the set of all ...
4
votes
1answer
179 views

Implementation of the Polynomial Chinese Remainder Theorem

I would like an implementation of the Chinese Remainder Theorem for polynomials in $\mathbb{Z}[x]$, that is, a function ...
-1
votes
3answers
237 views

Find integer values of p such that $(2^p - (2^2)(3^2))/ (3^3)$ is an integer

Find integer values of p such that $(2^p - (2^2)(3^2))/ (3^3)$ is an integer.
-5
votes
1answer
196 views

random number visualization without generator (Spectral Test)

Does anyone have codes for using only numbers to make this kind of random-number visualization and not requiring a number generator? ...
6
votes
2answers
274 views

Next highly composite number?

R language has this function 'nextn' (link) which computes the next highly composite number greater than a given one, which is used to find the optimal padding size for the subsequent FFT operation. ...
2
votes
1answer
155 views

Expressing large numbers in index form

I have a quick question. Is there anyway of expressing a large number as a power of another number in Mathematica? By this, I mean for example, $1237940039285380274899124224 = 512^{10}$. Is there a ...
13
votes
3answers
461 views

How to know if a number is the square of a rational?

I'm pretty new with Mathematica and I was looking for a way to know whether a number is a square of a rational. I thought of Head[Sqrt[myNumber]] == Rational ...
4
votes
1answer
126 views

How can I program the RiemannR function using the LogIntegral command?

I would like to program the RiemannR function using the LogIntegral command because I would like to later experiment with a ...
1
vote
1answer
140 views

Hermite Normal Form in “columns” convention

After describing the Hermite Normal Form (HNF), MathWorld explains: The Hermite normal form for integer matrices is implemented in Mathematica as ...
3
votes
1answer
386 views

Function to Determine Lucky Numbers

Given a list of the form {1, 3, 5, 7, ...}, the lucky numbers are obtained by looking at the first list element after 1 (so 3 in this case), and deleting all list ...
2
votes
3answers
366 views

Generating pairs of additive and multiplicative factors for integers

Given an integer $n$, I want to get two lists: a) the set of pairs of the divsors $a,b$ into exactly two factors $n=a\cdot b$, b) the set of pairs $a,b$ of two summands $n=a+b$. The code I ...
3
votes
1answer
156 views

Finding the largest integer that cannot be partitioned in a certain way

I want to use Mathematica to solve the problem: Find the maximum $k$ such that $6x+9y+20z=k$ does not have a non-negative solution. I tried FrobeniusSolve. ...
10
votes
2answers
418 views

FiniteFields package is very slow. Any fast substitute for Mathematica?

I want to compute the inverse of matrix, say with dimensions $100 \times 100$, defined over a large finite field extension such as $GF(2^{120})$. I am using the package FiniteFields, but Mathematica's ...
3
votes
1answer
239 views

How does Mathematica calculate the nth prime?

When I enter Prime[2000000000000], the two-trillionth prime, Mathematica gives 61427839512211 for the answer after several ...
33
votes
2answers
3k 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 : ...
2
votes
3answers
180 views

Why do these two different zetas produce the same value?

Zeta[-13] == Zeta[-1] == -1/12 Why do these two different zetas produce the same value?
3
votes
1answer
147 views

Generating a list of all factorizations

What is the best way to generate a list of all factorizations of some number $n$? I'm quite new to Mathematica so this might be obvious. I have been trying some basic stuff with ...
1
vote
1answer
130 views

Another MoebiusMu question

When I evaluate the Mertens function to infinity: NSum[MoebiusMu[k], {k, 1, \[Infinity]}] I get -1, but I expected to get -2. I wanted to modify the ...
4
votes
3answers
434 views

Implementing the Farey sequence efficiently

There is of course the silly implementation: FareySequence[n_] := Union[Flatten[Table[j/i, {i, 1, n}, {j, 0, i}]]] However, there are numerous properties and ...
2
votes
2answers
282 views

Plotting Chebyshev's theta function $\vartheta(x)$

The function I would like to plot is defined as $\sum\limits_{p\leq x}\log p.$ The following gives me I think a plot of the points of interest, but the function is defined for all $x > 0$ and so ...
4
votes
1answer
305 views

Which DirichletCharacter is KroneckerSymbol?

If $d$ is a fundamental discriminant, KroneckerSymbol[d,n] is a Dirichlet character modulo $|d|$. Which one is it? If $d>0$ is a prime $\equiv 1\bmod 4$, then ...
7
votes
1answer
278 views

What is the confidence limit on this convergence?

When I run this, Product[n^MoebiusMu[n],{n,1,Infinity}] I get $\frac{1}{4 \pi^{2}}$ Over on Math Overflow they are saying it shouldn't happen. So, how do ...
7
votes
1answer
187 views

Testing for primality in quadratic rings?

Testing for primality in $\mathbb{Z}[\sqrt{-1}]$ in Mathematica is easy: PrimeQ[n, GaussianIntegers -> True] But how can I test for primality in, say, ...
5
votes
3answers
190 views

How could I implement the equivalent of NextPrime

I would like to know what an implementation of the function NextPrime would look like if it were implemented in Mathematica's core language.
6
votes
1answer
119 views

Implementing Remainder Tree

I want to implement Remainder Tree based on this. With the answers on SE I've come up with: ...
13
votes
2answers
389 views

Why does iterating Prime in reverse order require much more time?

Say I would like to display the $10$ greatest primes that are less than $10^5$. I could do the following: ...
3
votes
0answers
239 views

Parallel PowerMod

Is there anyway to parallelize the PowerMod function? Here is my Left-To-Right modular exponentation: ...
6
votes
1answer
401 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
0answers
99 views

Doing computations in a modulo ring

I need to perform some computations in a modulo ring, like Mod[Subfactorial[n], m] Mod[Binomial[n, k], m] However, this is obviously much too slow for large ...