Questions tagged [number-theory]

Questions on the number-theoretic functionality of Mathematica.

291 questions
Filter by
Sorted by
Tagged with
32 views

Division algorithm problem that need to be solved by using procedure [on hold]

My problem is; Write a procedure which finds the quotient and remainder of the division algorithm applied to two integers a and b. How can I use Floor to solve ...
3k 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.
65 views

Integral Cuboid Problem [migrated]

Any progress in solving the integral cuboid problem?: Find a "brick" of integral dimensions a, b, c such that the 3 face-centered diagonals based on (a,b), (b,c), (...
380 views

Drawing a sequence of circles

For every natural number from 1 to 150, draw a circle centered on the x-axis in that number and with the diameter equal to the number of divisors of the number. I don't know what should I do.
51 views

Recurrence involving a product of recurrents

I can solve the following recurrence problem as follows: ...
77 views

Does such prime $P$ exist? [migrated]

The equation $(10^{6n+1}-54n-10)($mod P$) = 0$ , find the value of prime P such that there are AT LEAST 3 solutions for n > 0 , whose values of n are all below (P-1)/6. I don't even know how to solve ...
176 views

solve for two variables for each n related to Collatz conjecture

For this code, for each x I would like to solve for all value ranges for c1 and c2 in a bounded range ie c1 and c2 in the range of real numbers +-100 for c1 and c2 for each x, which combined give "...
170 views

automatic formula finding function [duplicate]

I am curious how easy it would be to automatically find some formulas related to basic number theory OEIS sequences using some Mathematica search algorithm for a small set of OEIS sequences as a ...
656 views

How can I plot a Farey diagram?

How can I plot the following diagram for a Farey series?
427 views

Factor a polynomial Root into Roots of smallest possible degree

Suppose I have a polynomial Root representing an algebraic number. I want to represent it as a product of several polynomial Root...
136 views

Summing over Prime Factors (without repetition)

Wolfram Mathworld (http://mathworld.wolfram.com/SumofPrimeFactors.html) describes a function sopfr(n), the sum of prime factors, which I currently need. This code doesn't work when I insert it in ...
39 views

Prime factorization related functions: prime factor to its power and power of prime [duplicate]

FactorInteger can be used to perform prime factorization: FactorInteger[5^2 7^3 11^4] Results in: ...
112 views

Generating numbers palindromic in two number bases

The purpose of the code below is to generate numbers that are $2d+1$ digit palindromes in number base $b+1$, and are also palindromic in number base $b+3$, where: The ...
198 views

789 views

1k 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 ...
321 views

Efficient code for minimum integer with given number of factors

I'm seeking an efficient implementation of the number-theoretic function giving the smallest integer $n$ that has exactly $k$ factors (not necessarily prime): ...