0, 1, 1, 2, 0, 4, 2, 2, 0, 5, 2, 3, 2, 3, 3, 4, 5, 4, 3, 2, 2, 6, 6, 2, 2, 4, 4, 6, 6, 4, 4, 2, 2, 4, 2, 2, 6, 6, 2, 2, 4, 4, 6, 6, 2, 2, 4, 4, 4, 2, 2, 4, 2, 0, 12, 6, 4, 6, 6, 4, 6, 6, 4, 4, 2, 2, 6, 6, 2, 2, 4, 4, 6, 6, 4, 4, 2, 2, 4, 2, 2, 6, 6, 2, 2, 4, 4
Offset: 1
Initially there are no terms in the sequence which satisfy any condition so a(1) = 0, whereupon the count is reset. Now count the number of prior terms such that the addition of 2 gives a prime. Since 0 + 2 = 2 is prime, a(2) = 1, and we increment from 2 to 4 finding that 1+4 = 5 is prime thus a(3) = 1. Since adding 6 to all prior terms gives 6,7,7 two of which are prime, we have a(4) = 2. Adding 8 to all prior terms results in 8,9,10,8 which contains no primes, so a(5) = 0; and so on.
Comments