# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a115971 Showing 1-1 of 1 %I A115971 #16 Oct 22 2018 12:44:50 %S A115971 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 A115971 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 A115971 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 A115971 a(0) = 0. If a(n) = 0, then a(2^n) through a(2^(n+1)-1) are each equal to 1. If a(n) = 1, then a(m + 2^n) = a(m) for each m, 0 <= m <= 2^n -1. %C A115971 Not the characteristic function of A047564, as it does not contain 256, although here a(256) = 1. - _Antti Karttunen_, Oct 18 2018 %H A115971 Antti Karttunen, Table of n, a(n) for n = 0..65537 %H A115971 Index entries for characteristic functions %F A115971 a(0) = 0; and for n > 0, if a(A000523(n)) is 0, then a(n) = 1, otherwise a(n) = a(n-(2^A000523(n))) = a(A053645(n)). - _Antti Karttunen_, Oct 22 2018 %e A115971 a(2) = 0. So terms a(4) through a(7) are each equal to 1. %e A115971 a(3) = 1, so terms a(8) through a(15) are the same as terms a(0) through a(7). %e A115971 From _Antti Karttunen_, Oct 22 2018: (Start) %e A115971 For n = 256 = 2^8, a(8) = 0, thus a(256) = 1. %e A115971 For n = 2^64, a(64) = 0, thus a(2^64) = 1. (End) %o A115971 (PARI) %o A115971 A000523(n) = if(n<1, 0, #binary(n)-1); %o A115971 A115971(n) = if(!n,n,if(!A115971(A000523(n)),1,A115971(n-(2^A000523(n))))); \\ _Antti Karttunen_, Oct 18 2018 %Y A115971 Cf. A000523, A053645. %Y A115971 Different from A320007. %K A115971 easy,nonn %O A115971 0,1 %A A115971 _Leroy Quet_, Mar 14 2006 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE