# Tag Info

Accepted

### How to calculate $\prod\limits_{p}\frac{p^2+1}{p^2-1}$?

A Trace reveals the problem: ...
• 234k

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

If you need all the primes that are twin primes up to n then. ...
• 36.3k

### Accuracy of PrimeQ function

Turning my comment into an answer, One of the tests performed by PrimeQ for machine-sized integers, namely Miller-Rabin using up to the first 12 primes as bases (...
• 25.5k
Accepted

### Evenly spaced Tick marks for Primes

As people on the comments pointed out this may be a problematic in various ways, but if all y-values of your points are primes, this can be accomplished with ...
• 19k
Accepted

### Making the number 12345...n

FromDigits@Flatten[IntegerDigits /@ Range[15]] 123456789101112131415 A function to do it: ...
• 11.8k

### Determining occurrence of a sequence of numbers in the first 50,000 primes

out = Select[MatchQ[IntegerDigits[#], {___, 5, ___, 4, ___, 3, ___}] &]@ Prime[Range[50000]]; Length@out 1588 ...
• 392k
Accepted

### Goldbach Partition

Take a look at IntegerPartitions, although it relies on brute-force enumeration that is unlikely to scale well. ...
• 271k

### Some information about PrimeQ function

Source: https://reference.wolfram.com/language/tutorial/SomeNotesOnInternalImplementation.html PrimeQ first tests for divisibility using small primes, then uses the Millerâ€“Rabin strong ...
• 5,335

### Determining occurrence of a sequence of numbers in the first 50,000 primes

Prime and IntegerDigits are Listable, ___ (i.e. ...
• 57.2k
Accepted

### Writing a number 'm' as a sum of 'n' prime numbers

Clear["Global*"] primePartitions[m_Integer?Positive, n_Integer?Positive] := IntegerPartitions[m, {n}, Prime /@ Range[PrimePi[m]]] For sum of exactly ...
• 155k

### What is a good way to compute successive primorials with Mathematica?

Mathematica code is already provided in the The On-Line Encyclopedia of Integer Sequences, here http://oeis.org/A002110 oeis Sol 1 ...
• 36.3k
Accepted

### Computing the twin prime constant with Mathematica

The problem with your code is that N[Product[...]] calls NProduct[...] which turns integers into reals before ...
• 2,088
Accepted

### Checking whether a certain number is prime

You are right!! Reverse /@ Table[IntegerDigits[Prime[i]], {i, 549, 2, -1}] // Flatten // FromDigits // PrimeQ True ...
• 10.6k
Accepted

### Largest k such that p^k divides n

IntegerExponent IntegerExponent[120, #] & /@ {2, 3, 5, 7} (* {3, 1, 1, 0} *)
• 35.8k

### Making the number 12345...n

f1 = FromDigits @ StringRiffle[Range[#], ""] &; f1 /@ {4, 10, 15} {1234, 12345678910, 123456789101112131415} ...
• 392k

### How to ask WolframAlpha to find 'x such that p=32*x+1 is prime'

General There are as many solutions as prime numbers If you Solve for $x$ Solve[32 x + 1 == p, x] ...
• 36.3k

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

One convention (the usual?) for counting twin primes is to count just 1 for each pair. The original question is ambiguous, but it seems that @rhermans (+1) has a different convention of counting 2 for ...
• 15.2k
Accepted

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

Here's a very short version: primePairs[x_] := With[{primes = Prime[Range[PrimePi[x]]]}, Intersection[primes, primes - 2]] It's returns the same numbers as @...
• 36.1k

### Can I use NextPrime[n] up to n=10^14?

NextPrime has no problems evaluating for large numbers well above $10^{14}$. I think it's safe to assume these are real prime numbers, for confirmation see the ...
• 36.3k

### Make a list of the first 100 primes, keeping only ones whose last digit is less than 3

SolveValues[x <= Prime[100] && Mod[x, 10] < 3, x, Primes] ...
• 392k

### Goldbach Partition

I propose to use FrobeniusSolve. It seems it gives results fairly quickly. How large is the number $n$ ? ...
• 37.7k

### Manipulate Slider to take its values from primes

Here is the example from TrackingFunction: ...
• 234k

### How to generate primes of the form 8n+1?

I'll comment on why your initial attempts failed and attempt to correct them. Others have done a better job suggesting better approaches. ...
• 3,473
Accepted

### Solve transcendental equation involving a built-in function

Solve[{0 < x < 1000 && x == 10 + PrimePi[x]}, x, Integers] (* {{x -> 16}, {x -> 17}} *)
• 17.3k

### Determining occurrence of a sequence of numbers in the first 50,000 primes

This should be speedier... Pick[p = Prime@Range@5*^4, StringMatchQ[IntegerString[p], "*5*4*3*"]]
• 25.7k
Accepted

### How to make a graphic for Sieve of Eratosthenes with a legend

ClearAll[primes] primes[n_] := Prime[Range @ PrimePi[n]] n = 120; array = Partition[Range @ n, 10]; split = Split[primes[n], #^2 >= n &]; ...
• 392k

### Making the number 12345...n

Without using IntegerDigits or string processing: ...
• 24.7k

### Can I use NextPrime[n] up to n=10^14?

The prime generator and the primality proving package both seem very quick at $10^{14}$: ...
• 46.9k
Accepted

### Make a plot of the nth prime divided by n*log(n) ,for n from 2to1000

DiscretePlot[Prime[n]/(n Log[n]), {n, 1000}]
• 46.9k