Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #21 Dec 07 2021 11:08:03
%S 1,1,0,1,0,1,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,1,0,1,0,0,0,1,0,0,0,1,0,0,
%T 0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,
%U 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1
%N Characteristic function of A228354.
%H Antti Karttunen, <a href="/A326956/b326956.txt">Table of n, a(n) for n = 1..65537</a>
%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>
%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%e -------------------------------------------------------------
%e . | Compositions of k
%e . |
%e n a(n) A228354 | k = 1 2 3 4 5
%e -------------------------------------------------------------
%e .
%e 1 1 1 1 1+1 1+1+1 1+1+1+1 1+1+1+1+1
%e 2 1 2 2 2+1 2+1+1 2+1+1+1
%e 3 0 1+2 1+2+1 1+2+1+1
%e 4 1 4 3 3+1 3+1+1
%e 5 0 1+1+2 1+1+2+1
%e 6 1 6 2+2 2+2+1
%e 7 0 1+3 1+3+1
%e 8 1 8 4 4+1
%e 9 0 1+1+1+2
%e 10 0 2+1+2
%e 11 0 1+2+2
%e 12 1 12 3+2
%e 13 0 1+1+3
%e 14 0 2+3
%e 15 0 1+4
%e 16 1 16 5
%e ...
%e Note that removing the compositions of k in colexicographic order that are associated to the zeros of this sequence so we have the partitions of k in the same order.
%o (PARI)
%o isA194602(n) = if(!n,1,if(!(n%2),0,my(prl=0,rl=0); while(n, if(0==(n%2),if((prl && rl>prl)||0==(n%4), return(0)); prl=rl; rl=0, rl++); n >>= 1); ((0==prl)||(rl<=prl)))); \\ See A194602.
%o A326956(n) = isA194602(n-1); \\ _Antti Karttunen_, Dec 06 2021
%Y Cf. A000041, A011782, A187219, A194602, A211992, A228354, A228525, A228720.
%K nonn
%O 1
%A _Omar E. Pol_, Sep 14 2019
%E Data section extended up to 120 terms by _Antti Karttunen_, Dec 06 2021