The tag has no wiki summary.

learn more… | top users | synonyms

8
votes
3answers
290 views

Generalization to AllTrue, AnyTrue and NoneTrue

I am wondering if there is a natural Mathematica way to generalize those functions. To be specific, All three functions AllTrue, ...
3
votes
2answers
95 views

Counting the total number of instances of some collection of objects in a list

I have a list of some sort list = {"l1","l2","l3","l4"} and I'd like to count the sum total number of occurrences of n of the ...
3
votes
1answer
133 views

Interpreting a formula from Graph Theory - where do x and y come from?

I'm trying to understand the generating function for OEIS A062734, which is in Mathematica. Essentially, despite knowing no Mathematica at all, I think I can parse most of it, but where do $x$ and $y$ ...
4
votes
2answers
68 views

Count the number of element repeats at various distances

I have a function of x: f[x_] := Abs[Extract[list, x + n] - Extract[list, x]] I then apply this: ...
13
votes
6answers
743 views

Quickly test if all element in list is the same

I'm running a Monte Carlo simulation. At the end, I want to count how many simulations return a list of same element. My problem: ...
6
votes
2answers
415 views

Counting the zeros in a factorial expansion [closed]

A number, as big as 1000! (! = factorial) is given. I need to find how many zeros are there in the number. I counted the no of terminal zeros by dividing 5, 25, 125, ... (untill fifth power < ...
0
votes
0answers
83 views

How to be faster at making a frequency list of increasing steps

I want to find propabilities of having a sequence in a list, by using frequencies. The case is that you will bet on an increase when the last event had an increased and bet on derease when the last ...
5
votes
8answers
416 views

How to add a column to a table that counts the number of times the lines appear?

I am at a complete loss at this. I have a table with 2 columns and n lines. Some of the lines are repeated. What I want to do is add a new column that counts the number of repetitions of each line. ...
8
votes
1answer
143 views

Strange behavior of BinCounts

Bug introduced in 8.0 and fixed in 10.0.0 Just try this example: ...
3
votes
2answers
208 views

How to count the number of n-gons and line intersections in an image of a complete graph?

I would like to count the number of line intersections and number of n-gons in a complete graph (which forms a regular polygon). The only way I've come up with that would allow me to do both in ...
-3
votes
1answer
41 views

How to obtain from a list, the different data that is in it, and the times that appear each one? [closed]

Are there an easy way to do... from historyobjetivot = {20, 20, 30, 40, 34, 20, 34}; obtain two lists: - One with the each diffrent item number in the ...
-1
votes
1answer
72 views

How do I count a number of primes(say smaller than N) that does not contain 5?

Title says it all. How do I count a number of primes(say smaller than N) that does not contain 5?
2
votes
2answers
116 views

Counting Events in a moving date range

I want to count the number of times events take place in a date range. The counting is done over a window of e.g. 28 days where the goal is to have between 11 and 13 events in the time window. The ...
9
votes
2answers
312 views

Counting and extracting hit circles/triangles for randomly chosen points

Below, you see a triangle in which the incircle was inscribed. As we know, the center of this circle is the intersection of the angle bisectors. At this point, one could go further and find the ...
3
votes
1answer
115 views

Count the number of sqrt and 4th powers in a function

This is a simple and short question. I have a function which contains a certain number of square roots and 4th powers, lets take this one: ...
6
votes
4answers
327 views

Counting adjacent elements in a Matrix?

To start, I have a situation where I have some matrix, for example $$ A=\left[ \begin{matrix} 4&2&2&3&3\\ 2&3&1&2&3\\ 3&0&4&0&4\\ ...
5
votes
4answers
921 views

Select a repeated element in a list

I want to select all elements that repeat 4 times in the list. I propose this code ...
0
votes
3answers
782 views

Find the number of nonzero elements

How do you find the number of elements in a matrix that are non-zero. For instance, the following matrix has 5 nonzero elements. ...
3
votes
3answers
256 views

Prime factor counting function

Is there any way I can speed up this prime factor counting function? (I am looking for all numbers in a range with 3 prime factors (counted with multiplicity).) ...