0, 0, 1, 0, 2, 0, 2, 2, 1, 6, 0, 5, 0, 2, 2, 1, 7, 0, 5, 2, 1, 5, 2, 1, 3, 0, 8, 0, 2, 4, 0, 3, 3, 1, 10, 0, 5, 4, 8, 12, 0, 5, 5, 1, 10, 10, 1, 3, 5, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1
Offset: 1
Start with a(1) = 0.
0 has not occurred before, so the rule says a(2) = 0.
Now 0 HAS occurred before, at a(1), 0 is not prime, so a(3) = 1, which is the number of places before a(2) where 0 occurs.
1 has not occurred before, so a(4) = 0.
0 occurred most recently at term a(2) and is not prime, so a(5) = 2.
2 has not occurred before, so a(6) = 0.
0 occurred most recently at term a(4) and is not prime, so a(7) = 2.
2 occurred most recently at term a(5) and 2 IS prime, so a(8) = 2 which is the number of places back where the previous prime occurred.
.. and so on!
Comments