Starting with 0, the sequence a(n) changes from 0 to 1 or back when the next number n is a prime.

A131378

Starting with 0, the sequence a(n) changes from 0 to 1 or back when the next number n is a prime.

Terms

    a(0) =0a(1) =0a(2) =1a(3) =0a(4) =0a(5) =1a(6) =1a(7) =0a(8) =0a(9) =0a(10) =0a(11) =1a(12) =1a(13) =0a(14) =0a(15) =0a(16) =0a(17) =1a(18) =1a(19) =0a(20) =0a(21) =0a(22) =0a(23) =1a(24) =1a(25) =1a(26) =1a(27) =1a(28) =1a(29) =0

External references