editing
approved
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”).
editing
approved
editing
proposed
a(0)=1, a(1)=1, a(p)=1 for primes p, and for composite n which are irreducible in GF(2)[X] (terms of A091214), a(n)=0, and for other composite n (terms of A091212), a(n) = 1 if there are such k and m that n=A048720bi(k,m) and a(k)*a(m) = 1, 0 otherwise.
(Please compare also to the formula for A236862).
A. Karttunen, <a href="/A091247/a091247.scm.txt">Scheme-program, containing a few functions needed for computing this sequence.</a>
(Scheme, naive implementationtwo quite inefficient implementations, which require also definec and/or GF2Xdivide from a linked Scheme-source file)
(definec (A236861 n) (cond ((< n 2) 1) ((prime? n) 1) ((= 1 (A091225 n)) 0) (else (let loop ((d 2)) (cond ((= d n) 0) ((and (= d (A091255bi n d)) (not (zero? (* (A236861 d) (A236861 (GF2Xdivide n d)))))) 1) (else (loop (+ d 1))))))))
Antti Karttunen, <a href="/A236861/b236861.txt">Table of n, a(n) for n = 0..8192</a>