login
A326956
Characteristic function of A228354.
2
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, 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, 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
OFFSET
1
EXAMPLE
-------------------------------------------------------------
. | Compositions of k
. |
n a(n) A228354 | k = 1 2 3 4 5
-------------------------------------------------------------
.
1 1 1 1 1+1 1+1+1 1+1+1+1 1+1+1+1+1
2 1 2 2 2+1 2+1+1 2+1+1+1
3 0 1+2 1+2+1 1+2+1+1
4 1 4 3 3+1 3+1+1
5 0 1+1+2 1+1+2+1
6 1 6 2+2 2+2+1
7 0 1+3 1+3+1
8 1 8 4 4+1
9 0 1+1+1+2
10 0 2+1+2
11 0 1+2+2
12 1 12 3+2
13 0 1+1+3
14 0 2+3
15 0 1+4
16 1 16 5
...
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.
PROG
(PARI)
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.
A326956(n) = isA194602(n-1); \\ Antti Karttunen, Dec 06 2021
KEYWORD
nonn
AUTHOR
Omar E. Pol, Sep 14 2019
EXTENSIONS
Data section extended up to 120 terms by Antti Karttunen, Dec 06 2021
STATUS
approved