If I have this vector:I would like to get the position of each unique number according to itself.At the moment I'm using:

## Count consecutive elements in a same length vector

If I have a vector likeHow can I generate a vector of the same length containing the count of consecutive elements, like so:

## Generate a list a(n) is not of the form prime + a(k), k < n

How to generate this list in Python? a(n) is not of the form prime + a(k), k < n.Here is the list on oeis http://oeis.org/A025043

## generating same positive and negative number in Oracle sequence

How can I generate the below numbers through sequence in oracleAnd so on. I can generate 1,2,1,2,1,2 through cycle but above I am not able to use logic.

## What is the best way of creating a repeating sequence in an array in F#?

In Python you can create the array and just add * n to make it repeat itself a number of times. But I want to know what is the best way to do this in F# without having to use a long loop. Also is it better to use an...

## Range with repeated consecutive numbers

I would like to create a range (e.g. (1, 5)) of numbers with some repetitions (e.g. 4): One way would be to write:

## How to find the indices where there are n consecutive zeroes in a row

Suppose I have this data:I want to recover the indices beginning where there are more than 3 zeroes in a row and terminating with the last 0 before a nonzero.