login
A392738
Positions of 0's in A392736.
2
0, 3, 5, 7, 9, 11, 12, 14, 17, 19, 20, 22, 25, 26, 28, 31, 33, 35, 36, 38, 41, 42, 44, 47, 48, 50, 53, 54, 56, 59, 61, 63, 65, 67, 68, 70, 73, 74, 76, 79, 80, 82, 85, 86, 88, 91, 93, 95, 97, 98, 100, 103, 104, 106, 109, 110, 112, 115, 117, 119, 121, 123, 124
OFFSET
1,2
COMMENTS
a(n) is the n-th position where the sequence A392736 equals 0. For any balanced binary sequence, the odious and evil enumerators u(n), v(n) satisfy u(n) + v(n) = 4n + 1.
FORMULA
A392737(n) + a(n) = 4n + 1.
EXAMPLE
a(1) = 0 because A392736 = 0,1,1,0,1,... and the first 0 is at position 0.
MATHEMATICA
M[0] = 0; M[1] = 1; M[n_] := M[n] = Which[Mod[n, 4] == 0, M[Quotient[n, 4]], Mod[n, 4] == 1, 1 - M[Quotient[n, 4]], Mod[n, 4] == 2, M[2*Quotient[n, 4] + 1 - M[Quotient[n, 4]]], True, 1 - M[2*Quotient[n, 4] + 1 - M[Quotient[n, 4]]]]; Select[Range[0, 120], M[#] == 0 &]
PROG
(PARI) M(n) = if(n<2, n, my(q=n\4, r=n%4); if(r==0, M(q), r==1, 1-M(q), r==2, M(2*q+1-M(q)), 1-M(2*q+1-M(q))));
a(n) = my(k=0, c=0); while(c<n, if(M(k)==0, c++); if(c<n, k++)); k;
CROSSREFS
Cf. A392736, A392737, A001969 (evil numbers).
Sequence in context: A329827 A182765 A246407 * A151916 A187687 A056617
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
a(51) onward corrected by Sean A. Irvine, Jan 25 2026
STATUS
approved