Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #13 Dec 03 2022 16:52:36
%S 0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,0,1,0,1,
%T 0,1,0,1,0,1,1,0,1,0,1,1,0,1,0,1,1,0,1,0,1,1,0,1,0,1,1,0,1,0,1,1,0,1,
%U 0,1,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,1,0,1,0,1,1,0,1,0,1,1,0,1,0,1,1
%N a(n) = 1 if A276086(6*n) == 5 (mod 6), otherwise 0, where A276086 is the primorial base exp-function.
%C Question: Are 0's and 1's evenly distributed? Exactly 50/50? See also A358847.
%H Antti Karttunen, <a href="/A358846/b358846.txt">Table of n, a(n) for n = 0..100000</a>
%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>
%H <a href="/index/Pri#primorialbase">Index entries for sequences related to primorial base</a>
%F a(n) = [A276086(6*n) == 5 (mod 6)], where [ ] is the Iverson bracket.
%F a(n) = A358842(6*n).
%F a(0) = 0, and for n > 0, a(n) = a(n-1) XOR A358847(n), where XOR is bitwise-XOR, A003987. See comments in A358842.
%o (PARI)
%o A358842(n) = { my(m=1, p=2); while(n, m *= (p^(n%p)); n = n\p; p = nextprime(1+p)); (5==(m%6)); };
%o A358846(n) = A358842(6*n);
%Y Characteristic function of A358844, whose complement A358845 gives the positions of zeros.
%Y Cf. A003987, A276086, A358840, A358842, A358847.
%K nonn
%O 0
%A _Antti Karttunen_, Dec 03 2022