# Tag Info

### Digits of Pi in colored spiral

At first we define the Archimedean spiral in parametric form a := 0; b := 0.3; r[t_] := a + b t; x[t_] := r[t]*Cos[t]; y[t_] := r[t]*Sin[t]; Next, generate a list ...
• 17.7k

### 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 ...
• 384k

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

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

### 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.6k

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

Prime[Range[50000]] // Short IntegerDigits /@ % // Short Flatten[SequenceCases[#, {___, 5, ___, 4, ___, 3, ___}] & /@ %, 1] // Length (* 1588 *) If you want ...
Accepted

### Digits of Pi in colored spiral

p defines how many disks there are in each revolution and do number of revolutions. ...
• 9,733

• 41.7k

...
• 152k

### Self-locating Strings in $\pi$?

This should be able to treat leading zeroes and is ten times faster: A precompiled function: ...

### Listing all monotone binary functions

Here's an approach using Reduce. The first step is to construct all of the inequalities. Consider a bit vector $b(1, 0, 1, 0)$. The inequalities that can be ...
• 130k

### Digits of Pi in colored spiral

This is going to require someone with much more Graphics knowledge than me, but we can start by creating a spiral of points and coloring based off digit: ...
• 3,453
Accepted

### Counting the number of Configurations in an Array with Constraints

A brute-force approach: ...
• 384k
1 vote

### Generate a sequence of primes giving position and value of a digit in its digit-decomposed version

I'm not fluent in Mathematica (and don't have access to it so I don't know how my code compares to those given here) but I added a link to an efficient PARI/GP program in oeis.org/A333085, which ...
• 111
1 vote

### Generate a sequence of primes giving position and value of a digit in its digit-decomposed version

I present a re-coded solution involving two functions. I have avoided using AppendTo and procedural constructs where possible. ...
• 65.8k
1 vote

### Short Normal Numbers in base 10

I'm not sure this is much of an improvement, but it does yield the same result as the OP. ...
• 7,671
1 vote

### Counting the number of Configurations in an Array with Constraints

I think you are looking for the number of binary necklaces of length n with no subsequence 000 (or 111), which is Sloane's A09335. The code given there is the following. ...
• 15.1k
1 vote
Accepted

### Listing all monotone binary functions

...
• 384k

Only top scored, non community-wiki answers of a minimum length are eligible