login

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”).

A098725
a(4n) = 0, a(2n+1) = 1, a(4n+2) = a(n+1).
5
0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1
OFFSET
0,1
COMMENTS
Apparently, the first differences of A072894.
MATHEMATICA
A098725[n_] := Which[OddQ[n], 1, Divisible[n, 4], 0, True, A098725[(n+2)/4]];
Array[A098725, 100, 0] (* Paolo Xausa, Apr 04 2024 *)
PROG
(PARI) a(n)=if(n%2==1, 1, if(n%4==0, 0, a((n-2)/4+1)))
CROSSREFS
Sequence in context: A286055 A140318 A060584 * A284939 A188260 A341625
KEYWORD
nonn
AUTHOR
Ralf Stephan, Oct 15 2004
STATUS
approved