# Questions tagged [number-theory]

Questions on the number-theoretic functionality of Mathematica.

374 questions
Filter by
Sorted by
Tagged with
48 views

### Non trivial zeros of Dirichlet L function

So I was wondering if I can find some of the non trivial zeros of the Dirichlet-L function using mathematica. What I found out was there is a code ZetaZero[] which ...
96 views

### How to implement statistics for the length of continued fractions of a result on MATHEMATICA

After successfully generating the reduced fraction of two coprime in interval (0,1] with the following; ...
50 views

### Residue for $L(s,\chi_1)$ not same in Mathematica as theoretical value

I want to find the residue of Dirichlet-L function, defined as $L(s,\chi)= \sum_{n=1}^\infty \frac{\chi(n)}{n^s}$ for $Re(s)>1$. We know that $Res_{s=1}L(s,\chi_1)=\frac{\phi(k)}{k}$, where $\chi$ ...
24 views

### Why does explicit Dirichlet Transform of Liouville Lambda not evaluate?

I have four expressions for the Dirichlet Transform of the Liouville-Lambda function, but one form does not evaluate, any ideas why and what could be done?
121 views

...
127 views

### How to FInd the sum of odd divisor of a number in Mathematica?

So I want to find the sum of odd divisors of a number raised to some power. $i.e.$ I want to find $\sum_{n=1}^\infty\sigma'_{-2k-1}(n)$ where $\sigma'_{-2k-1}(n) = \sum_{d|n, \text{d odd}} d^{-2k-1}$. ...
29 views

59 views

### Strange results from FrobeniusSolve

As part of pruning for my code searching for optimal addition chains I want to try and find some fast ways to discover that certain numbers are not representable in the Frobenius coin problem. An ...
4k views

### Fastest square number test

What is the fastest possible square number test in Mathematica, both for machine size and big integers? I presume starting in version 8 the fastest will be a dedicated C LibraryLink function.
104 views

### Whats the Mathematica command for the skew harmonic number?

What's the Mathematica code for the skew harmonic number: $$\overline{H}_n=\sum_{k=1}^n \frac{(-1)^{k-1}}{k}.$$ Wolfram expresses this number as $$\ln(2)-(-1)^n \text{LerchPhi}(-1,1,n+1).$$ I am ...
116 views

### Does anyone have a Mathematica implementation of the standard $\arg\zeta(s)$ function required to evaluate $S(T)$?

This question is related to my question Is there an elegant exact formula for the zeta zero counting function? on Math StackExchange. Question: Does anyone have a Mathematica implementation of the ...
318 views

### How to ask Mathematica to solve a simple modular equation

What's the most straightforward way to ask Mathematica to find all solutions of an equation like $$3x + 2y + 4z = 0 \pmod {11}$$ (for instance), where either $x$, $y$, $z$ can be considered to be ...
151 views

### Solving calculation puzzle [closed]

I recently got asked how to achieve a result of 100 only using the numbers {1,7,7,7,7} (the number 1 can be used only once and ...
123 views

### Plotting Riemann Prime Counting

I want to program the formula in this page. Didn't take me long to get to my code below. But 1) it only plots the prime counting function and 2) evaluation takes incredibly long. How can I fix it? <...
106 views

116 views

### How to ask Mathematica to range all the natural numbers $1<n<500$ which are not multiples of 5? [closed]

How can I ask Mathematica to range all the natural numbers $1<n<500$ which are not multiples of 5? I mean I need to get $$\{1,2,3,4,6,7,8,9,11,12,13,14,16,...,499\}$$
107 views

### What is the probability of the digit $k$ in the number $x^n$

Well, the title of the question says it all: how to write a code that finds the probability of the digit $k$ in the number $x^n$? For example, when $x=2$, $n=100$, and $k=7$ we are trying to find how ...
107 views

### How to find the 2 smallest integers that is divisible by 40131 and 41405 [closed]

I'm trying to find the two smallest integers that is divisible by 40131 and 41405, i.e 40131|a, 41405|a, 40131|b and 41405|b. There is a hint within the question that says you can use FactorInteger[] ...
386 views

### Solving an equation in natural numbers

I am trying to solve the following equation in the Natural Numbers, with the condition $a\ge1$, $b\ge1$, and $r\ge3$: $$\frac{a(a + 3)(a(r - 5) + (12 - r))}{9}=\frac{b (9 + b (-14 + r) - r)}{3}\tag1$$ ...
87 views

### using DeleteCases with CoprimeQ

first let me show what I have working correctly f = Permutations[Range, {3}] Riffle[f, Apply[CoprimeQ, f, {1}]] now I would like to automate the deletion of a ...
155 views

### Finding the number of even numbers in Pascal's triangle (code gives memory error)

I have the following code: ...
114 views

### Writing a program that finds for what $(x,y)$ a function gives a perfect square number

The overal question I am trying to answer is: For what $(x,y)$, which are positive integers, is the following number a perfect square number? 9 \left(x^3 (y-2)^2+3 x^2 (y-2)-2 x (y-45) (y-2)+7 (y-1)^...
82 views

### How to write this simple task of unimodular prime search in mathematica?

For testing a particular algorithm I found mathematica is the best way as it has all the tools I need. I am stuck in a number theory part and since I am not an expert in mathematica I do not know how ...
60 views

### A modular version of LinearRecurrence?

I'm playing around with implementing the Lucas probable prime test (mainly so I can understand it better), and would love a version of the LinearRecurrence function that used addition modulo n (with n ...
162 views

### RSA encryption/decryption with signed message

I was going through a book with some tasks that you can work with mathematica on, and I found this particular task interesting: Proffesor Alice has sent an assignment to Bob, one of her students. To ...
206 views

### Exact division and geometric sequences

I imagine this problem has a name that I don't know; it's probably some sort of exact division problem. Here goes: imagine you have to divide 4 cookies among 11 people. Divide the cookies equally ...
64 views

### FactorInteger snippet works, but use of Sow/Reap/Print is clunky

This is a code review or de-clunking request. If it doesn't belong here, I'll withdraw it. The below toy works and produces the proper output, that is, for numbers to be factored that can be expressed ...
I asked this question on Math stachexchange. The question I have is: Can I use Mathematica to find the (integral points on the following elliptic curve) or can I find when the number $\text{n}$ is a ...