The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A320007 If there is k >= 0 such that floor(n/4^k) is odd and A320006(k) is 1, then a(n) = 1, otherwise a(n) = 0. 4

%I

%S 0,1,0,1,1,1,1,1,0,1,0,1,1,1,1,1,0,1,0,1,1,1,1,1,0,1,0,1,1,1,1,1,0,1,

%T 0,1,1,1,1,1,0,1,0,1,1,1,1,1,0,1,0,1,1,1,1,1,0,1,0,1,1,1,1,1,0,1,0,1,

%U 1,1,1,1,0,1,0,1,1,1,1,1,0,1,0,1,1,1,1,1,0,1,0,1,1,1,1,1,0,1,0,1,1,1,1,1,0

%N If there is k >= 0 such that floor(n/4^k) is odd and A320006(k) is 1, then a(n) = 1, otherwise a(n) = 0.

%C An auxiliary sequence to compute A320006 with mutual recurrence.

%C First differs from the characteristic function of A047564 at n = 256.

%C This differs from A115971 at least at points n=2^k, where k = 64, 66, 72, 74, 80, 82, 88, 90, 96, 98, 104, 106, 112, 114, 120, 122, 192, ...

%H Antti Karttunen, <a href="/A320007/b320007.txt">Table of n, a(n) for n = 0..65537</a>

%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>

%e For n = 1, floor(1/4^0) = 1 is odd and A320006(0) = 1, thus a(1) = 1.

%e For n = 4, floor(4/4^1) = 1 is odd and A320006(1) = 1, thus a(4) = 1.

%e For n = 9, floor(9/4^0) = 9 is odd and A320006(0) = 1, thus a(9) = 1.

%e For n = 14, floor(14/4^0) = 14 is even but floor(14/4^1) = 3 is odd with A320006(1) = 1, thus a(14) = 1.

%e For n = 16, floor(16/4^2) = 1 is odd, but A320006(2) = 0, thus a(16) = 0.

%e For n = 256, floor(256/4^4) = 1 is odd, and A320006(4) = 1, thus a(256) = 1.

%e For n = 272, floor(272/4^2) = 17 is odd, but with A320006(2) = 0. However, floor(272/4^4) = 1 is also odd and A320006(1) = 1, thus a(272) = 1.

%e For n = 2^64 = 18446744073709551616, floor(2^64/4^32) = 1 is odd, but A320006(32) = 0, thus a(2^64) = 0.

%o (PARI)

%o A320006(n) = if(!n,1,my(m=(n>>1), r=0); while(m>0, if((m%2)&&!A320007(r),return(0)); m >>= 2; r++); (1));

%o A320007(n) = if(!n,0,my(m=n, s=0); while(m>0, if((m%2)&&A320006(s),return(1)); m >>= 2; s++); (0));

%Y Cf. A320006.

%Y Different from A115971.

%K nonn

%O 0

%A _Antti Karttunen_, Oct 18 2018

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified September 26 12:36 EDT 2021. Contains 347665 sequences. (Running on oeis4.)