Skip to main content

Questions tagged [number-theory]

Questions on the number-theoretic functionality of Mathematica.

Filter by
Sorted by
Tagged with
1 vote
1 answer
154 views

$LLL$ is implemented in Wolfram Mathematica as $\mathsf{LatticeReduce}$ command. If we want to reduce a rank $k\leq n$ lattice in $\mathbb Z^n$ where the generator matrix of the lattice has integral ...
Turbo's user avatar
  • 157
0 votes
1 answer
613 views

I am reading an interesting paper One of the numbers ζ(5), ζ(7), ζ(9), ζ(11) is irrational by Zudilin. We fix odd numbers $q$ and $r$, $q\geq r+4$ and a tuple $\eta_0,\eta_1,...,\eta_q$ of positive-...
Max's user avatar
  • 373
0 votes
1 answer
92 views

I want to compute a Dirichlet convolution with a function that has a conditional. For simplicity, let's say: idifeven[n_]:=If[EvenQ[n],n,0] Let's convolve this ...
Mathieu's user avatar
  • 21
8 votes
1 answer
567 views

I am reading an interesting paper One of the numbers ζ(5), ζ(7), ζ(9), ζ(11) is irrational by Zudilin. Define $$\varphi_0(x,y):=\sum_{j=1}^{3}([y]+[\eta_0x-y]-[y-\eta_j x]-[(\eta_0-\eta_j)x-y]-2[\...
Max's user avatar
  • 373
6 votes
1 answer
678 views

There is a need to increase the number of correct decimal digits from this integral: ...
Mats Granvik's user avatar
  • 1,221
10 votes
1 answer
367 views

I'm working on an OEIS submission that counts the number of n-digit A157711 primes. Working with PrimeQ as my primality determinator, I can generate some 1200 terms. However, it has been pointed out ...
Hans Havermann's user avatar
7 votes
1 answer
479 views

A001422 gives the whole set of 31 numbers which are not the sum of distinct squares (see also MathWorld). That article also provides code for it: ...
Vitaliy Kaurov's user avatar
3 votes
2 answers
297 views

Given a number, I am trying to find the longest streak of positive divisibility into sequential smaller numbers. Here's an example: We have this 2D list: ...
Steve237's user avatar
  • 1,747
10 votes
2 answers
402 views

Sorry if the question is quite basic, I started learning Mathematica today to help me with group computations. I'm trying to get the generators of the group of units modulo p, with p a prime. However, ...
Mati's user avatar
  • 103
1 vote
1 answer
125 views

I am trying to use Mathematica to simplify sums of the form $$\sum_{0 \leq j \leq 5}\sum_{0 \leq k \leq 1}\omega^{nj-k},$$ subject to the polynomial equations $\omega^{6} = 1$ and $\omega^{2} = \omega ...
qprojvar's user avatar
11 votes
5 answers
667 views

Is there a standard approach in Mathematica for recognizing Euler products? For example, I have the following product $$\prod_{p} \frac{1-p^{s}+p^{2s}}{\left(p^s-1\right)^2}.$$ There is a nice closed ...
test1's user avatar
  • 213
2 votes
0 answers
82 views

I was watching this video (2:30 of https://youtu.be/zLEyIT_BCgk?si=ji5NyjR7vcwzaNxi ). Here in the video he said that to get the lattice , we just integrate over the curve(silver line) and we will ...
Kazi Abu Rousan's user avatar
9 votes
3 answers
1k views

According to taxicab geometry, there are 1226 possible paths from A(2,5) to B(7,9), all with a distance of 9 units, |2-7|+|9-5|=9. I wanted to write a code where I could be obtaining the plots of some ...
Rubens Vilhena Fonseca's user avatar
2 votes
2 answers
207 views

The list array is: list = Subsets[Range[2, 8], {2}] get the list is: ...
csn899's user avatar
  • 1
1 vote
1 answer
232 views

I am reading an interesting paper One of the numbers ζ(5), ζ(7), ζ(9), ζ(11) is irrational by Zudilin. We fix odd numbers $q$ and $r$, $q\geq r+4$ and a tuple $\eta_0,\eta_1,...,\eta_q$ of positive ...
Max's user avatar
  • 373
6 votes
4 answers
333 views

Working this question on Mathematics Stack Exchange, I have the following questions: how to generate a rational number $a$ such that $\sqrt{a^2-1}$ be also rational? This is the case of $a=\frac 54$. ...
Claude Leibovici's user avatar
4 votes
5 answers
588 views

For some purposes I need to know if there are there any carries in the multiplication of two numbers, especially in base-2. How can we do this in Mathematica? Thanks to all, very interesting answers! ...
lesobrod's user avatar
  • 2,590
3 votes
0 answers
96 views

PrimeZetaP was introduced in version 7.0. I suspect there were made some changes in the definition of this function in subsequent versions. Is there any user that ...
azerbajdzan's user avatar
  • 32.8k
0 votes
1 answer
172 views

Suppose I have the expression $$\sqrt{p(2-p)} \tag 1$$ and the expression $$ \sqrt{\frac{1}{4}\left( p-2 \right) ^2-\frac{4\left( p-1 \right) ^4}{\left( p-2 \right) ^2}}. \tag 2 $$ The Mathematica ...
narip's user avatar
  • 521
0 votes
1 answer
196 views

Is there a reason why the function PartitionsP[] does not return anything for non-integer arguments, although there is a way to calculate using Rademacher’s ‘exact’ ...
ftel's user avatar
  • 3
1 vote
0 answers
165 views

It is a question from the math olympiad I was participating in that happened like a month ago. The provided solution turned out to be wrong. It isn't the question itself, but the solution basically ...
Богдан Красновид's user avatar
10 votes
5 answers
4k views

In How to make the digits of π go around in a spiral like this? it is described how to plot pi in a spiralform (in my case as binary number): ...
ralf_7's user avatar
  • 103
3 votes
2 answers
229 views

Model 1 Consider the permutation list of 4-bit-strings: list = Permutations[{0, 0, 1, 1}, {4}] which outputs: {{0, 0, 1, 1}, {0, 1, 0, 1}, {0, 1, 1, 0}, {1, 0, 0, ...
wonderich's user avatar
  • 963
8 votes
2 answers
712 views

Ramsey partitions for parameters $a$ and $b$ are certain integer partition of $a+b$ developed by McAvaney, Robertson, and Webb (Combinatorica 1992) for applications in fair division problems where two ...
Brian Hopkins's user avatar
2 votes
6 answers
659 views

I want to find a combination that satisfies all the solutions of the following formula. $$ x_{1}^{5}+x_{2}^{5}+x_{3}^{5}+x_{4}^{5}-x_{5}^{5}=0 $$ $x_{1}$, $x_{2}$, $x_{3}$, $x_{4}$, and $x_{5}$ are ...
Vancheers's user avatar
  • 776
5 votes
2 answers
288 views

I want to factorize big numbers like 10^100. FactorInteger with no Automatic option can take a lot of time and as I know there ...
Андрей Яндуганов's user avatar
0 votes
0 answers
97 views

I read some basic knowledge about characters and L functions, and would like to play around with them in MMA. I tried to do the following things, but ending in minor success. (MMA notation used) ...
Po1ynomial's user avatar
4 votes
1 answer
263 views

I am working on distinct partitions. I recently created a function StrictIntegerPartitions. This is from the book Integer Partitions by George E. Andrews at Pennsylvania State University and Kimmo ...
Peter Burbery's user avatar
9 votes
4 answers
885 views

A strict partition of an integer has all distinct parts. There are no duplicates like 1 in {5,3,1,1} for 10. All the parts are unique. Sylvester created a bijection between the partitions of an ...
Peter Burbery's user avatar
3 votes
4 answers
1k views

Find all integers $k\le100$, so that there exists an integer $n$, satisfying \[k\mid3n^6+26n^4+33n^2+1.\] By number theory knowledge it suffices to check $n\in[1,k]$, but we'll do $[1,100]$ for ...
youthdoo's user avatar
  • 647
2 votes
0 answers
83 views

Let D>1 be a square-free rational integer, and write \Q for the rationals. I am trying to determine the (non-)membership of ...
GaryMak's user avatar
  • 121
1 vote
1 answer
153 views

Say I run the following: PowersRepresentations[4782969,4,2] and it takes about 2 minutes. If I call it again it takes only about 0.0005 seconds. What determines ...
1729taxi's user avatar
  • 826
0 votes
1 answer
97 views

If I type something like this into Mathematica: ...
Mats Granvik's user avatar
  • 1,221
1 vote
1 answer
138 views

I'm working with the Zeckendorf representation of prime numbers. I'm using ResourceFunction["ZeckendorfRepresentation"][Prime[n]] and I would like to select from all the results, the ones ...
user967210's user avatar
1 vote
1 answer
94 views

Let E be the base of natural logarithm 2.71... A Sequence S[n] is believed to converge to a ...
imida k's user avatar
  • 4,435
2 votes
3 answers
369 views

Is there a method to determine the unique combination of numbers a, b, c and d which satisfy the relation below, and which yields the output with the numbers in the given order. Example for 2023 is ...
thils's user avatar
  • 3,303
5 votes
2 answers
770 views

I would like to perform computations with primes up to $n=10^{14}$. To do so, I would like to go through all primes, from $2$ to $10^{14}$ and perform some calculation on each prime. I saw that one ...
Klangen's user avatar
  • 1,061
5 votes
8 answers
744 views

I have two sets of real numbers, say, set1= {b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11} ...
MsMath's user avatar
  • 195
1 vote
1 answer
180 views

I would like to Randomly generate n^2 natural numbers in an interval from 1 to n. Then consider placing each number on the cell with the same number (you can imagine the board numbered naturally, row ...
SkySystem's user avatar
2 votes
2 answers
243 views

I need to write the number '80668227' as a sum of 4 & 5 cubes. I tried this code PowersRepresentations[80668227, 4, 3] in Mathematica but the above code is ...
Littlewood's user avatar
7 votes
0 answers
128 views

Does there exist some way to use Mathematica to compute the Dedekind Zeta function for an arbitrary algebraic number field? Or does there exist some package to do this? I am actually only interested ...
Mike Battaglia's user avatar
5 votes
4 answers
1k views

Lets say that we want to find the least n such that n^2+23 is divisible by 2^100. We can compute this in one line using the Pari/GP language: ...
ZaMoC's user avatar
  • 6,807
4 votes
3 answers
432 views

Suppose I have such a set $S=\{3,4,5,...n+2\}, n\in \mathbb{Z}_{>\, 0} $, $a_n$ is any permutation of $S$ such that $n|a_n$, I want to know how many such $a_n$. The easy but inefficient way to do ...
expression's user avatar
  • 5,782
3 votes
4 answers
267 views

I am trying to learn the mathematica language. And it was suggested to me to start by doing the Project Euler problems. I am currently working on Problem # 4: A palindromic number reads the same both ...
SugarFoot's user avatar
4 votes
2 answers
146 views

I want to find numbers $n$ for which the decimal digits of $n$ appear $n$ times in the decimal representation of $n!$. For instance, $n\in\left\{0, 1, 1170, 1528, 9877, 9886, 9897, 11535\right\}$ are ...
Jan Eerland's user avatar
  • 2,021
3 votes
3 answers
248 views

I am trying to find ALL or a list of possible values for x satisfying: x MOD 9 ==2 AND (x+631) MOD 9 = 3 Using Mathematica. can anyone help? 2 is not the only answer 497 is another one since 497 mod ...
hamzeh musmar's user avatar
6 votes
2 answers
161 views

I would like to solve this equation: x1y1 + x2y2 + x3y3 + x4y4 = 0 and I would like to count the number of distict solutions. Here $x_1,\dots,x_4$ and $y_1,\dots,...
MathRevenge's user avatar
1 vote
1 answer
174 views

Given a sum in the form Sum[n^k, {k, kl}] for some natural n and natural list kl, is it ...
sam wolfe's user avatar
  • 5,023
1 vote
0 answers
100 views

There is a bug in DirichletConvolve. These two codes are same except that in first one MoebiusMu is used in another ...
azerbajdzan's user avatar
  • 32.8k
3 votes
0 answers
177 views

Bug introduced in 13.0 or earlier and persisting through 13.2.0 or later. Input 1: ...
azerbajdzan's user avatar
  • 32.8k

1
2 3 4 5
10