In the sequence 1, 0, 1, 0, 1, 0, 3, 5... each member after the sixth one equals the units' digit of the sum of the six preceding numbers of the sequence.
Prove that the subsequence 0, 1, 0, 1, 0, 1, will never occur.
I used awk, a standard Linux tool, and found that 010101 enters a 1456-turns long cycle, without ever passing through 101010.
The code is:
BEGIN {
a1=0; a2=1; a3=0; a4=1; a5=0; a6=1
b1=0; b2=1; b3=0; b4=1; b5=0; b6=1
for(turn=0; (turn==0) || a1!=b1 ||
a2!=b2 || a3!=b3 || a4!=b4 ||
a5!=b5 || a6!=b6 ; turn++){
a7= (a1+a2+a3+a4+a5+a6)%10
a1=a2; a2=a3; a3=a4; a4=a5; a5=a6; a6=a7
b7= (b1+b2+b3+b4+b5+b6)%10
b1=b2; b2=b3; b3=b4; b4=b5; b5=b6; b6=b7
b7= (b1+b2+b3+b4+b5+b6)%10
b1=b2; b2=b3; b3=b4; b4=b5; b5=b6; b6=b7
if (a1==1 && a2==0 && a3==1 &&
a4==0 && a5==1 && a6==0) {
print "1,0,1,0,1,0 reached in ", turn, " turns"
break
}
}
print a1, a2, a3, a4, a5, a6, turn
}