Formula for permutations in a subset Hello I am not a mathematician so please be understanding if my terminology is off. I will explain this using examples to be as clear as possible.
I have a sequence of numbers [1,2,3,4,5,6,7,8] and I need to calculate the permutations of this sequence. My understanding of a permutation is that these numbers cannot move positions however their values can change. The values can repeat.
The changing of the values is only allowed for one to four items in this set. For this example let's assume that the value can be it's native value (above) or the number is doubled. Here are some sample scenarios, changed values are in bold. 
[2,2,3,4,5,6,7,8]
[1,4,3,4,5,6,7,8]
[2,4,6,8,5,6,7,8]
[1,2,3,4,10,6,7,16]
[2,2,3,4,5,6,14,8]
[2,2,3,8,5,6,14,8]
So the sequence never changes but one to four out of eight of the values can change but only to another value. 
I believe that if I wanted every permutation of this set it would be 2^8 (two values for each of the eight numbers) however I am not sure how to account for the fact that only one to four items can be modified. 
Thanks in advance!
Edit: 
Since this needs to scale here is a smaller problem set for testing using four numbers [1,2,3,4]. This means that out of the four in the set only two will be doubled. There are ten possible values. 
[1,2,3,4]
[1,2,3,4]
[1,2,3,4]
[1,2,3,4]
[1,2,3,4]
[1,2,3,4]
[1,2,3,4]
[1,2,3,4]
[1,2,3,4]
[1,2,3,4]
 A: Concerning the example mentioned in your question.
Under condition that exactly $k$ items can take $2$ distinct values there are $\binom8{k}2^k$ possibilities. 
With $k$ ranging over $\{1,2,3,4\}$ the total number of possibilities is:$$\sum_{k=1}^4\binom8{k}2^k$$ 
A: You can solve this problem by thinking that your numbers have a certain position in a string of numbers. E.g. lets say we have the numbers 1,2,3,4.
We will first consider the problem with repetitions:
For the first position you can have 4 possible numbers. For the second position also 4 possible numbers. For the third position 4 possible numbers and for the last position you again have 4 possible numbers. That make a total of $4\cdot 4\cdot 4\cdot 4=4^4$ possibilities.
Now lets consider the problem without repetitions:
For the first position you can choose from 4 numbers. For the second you can only choose from 3 numbers, as you already used one numer for the first position. For the third postion you can only use 2 numbers, as you already used 2 numbers for the first to positions. For the last position you can only choose from one number, as you already used up all the other numbers. That make a total of $4 \cdot 3\cdot 2\cdot 1=4!$. The last expression is called the factorial of 4 and is used as a shorthand notation for products of natural numbers. E.g. $7!=1*2*3*4*5*6*7$ and so forth.
