Rolling digital number lock There's a simple digital number lock. After each button press the lock checks if the previous four presses constitute the correct code. I.e. typing 44445 tests two codes: 4444 and 4445. You must brute force it with a code golfed program.

Rules


Your program must test numbers by printing ASCII digits 0-9 to standard output. Other output, if any, will be ignored.
The program must be deterministic. If you need "random" numbers, you must use a deterministic generator with a well defined seed.
Infinite output beyond all 10^4 codes is allowed. Opening the lock is considered to stop the program.


Scoring


Calculate the average digits of output needed to crack the lock. I.e. search the output string for every possible four digit sequence and record where it first appears.
Add the source code length in bytes. The program must be fully functional, you are not allowed to omit imports or other boilerplate.



  Score = Average digits to crack + codelength in bytes


Example entry

Python, 35 bytes.

for i in range(9001):print '%.4d'%i


Score: 8444.9837 + 35 = 8479.9837

Other

Simple, stupid Python program to verify score of an output string:

d = {}
s = ''.join(c for c in s if '0' &lt;= c &lt;= '9')
for i in range(len(s)-4):
    t = s[i:i+4]
    if t in d:
        continue
    d[t] = i + 4
    if len(d) == 10000:
        break
print sum(d.values()) / 10000.
Java 5218

This is the (golfed) code:

class a{int[]a=new int[5];public static void main(String[]a){new a().b(1,1);}void b(int t,int p){if(t&gt;4)for(t=0;++t&lt;=p&amp;&amp;4%p==0;)System.out.print(a[t]);else{a[t]=a[t-p];b(t+1,p);for(a[t]=a[t-p];++a[t]&lt;=9;)b(t+1,t);}}}


It prints a specially crafted sequence to stdout. The completed sequence has all combinations, only once, in the shortest way possible. The total length is 10.000 with the first combination after 4 (obviously) and the last after 10.000. So if I understand the challenge correctly my score is:

4 + ((10000-4)/2) = 5002 avg length to break the code
5002 + 216 (code length) = 5218


Obviously this score will be improved (Java is pretty verbose), so I'm not going to tell you the name of the sequence I'm using...