login
Common residues of binomial(3n+2,n+1)/(3n+2) modulo 2.
6

%I #14 Jan 12 2019 20:45:26

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

%T 1,0,1,0,0,0,1,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,

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

%N Common residues of binomial(3n+2,n+1)/(3n+2) modulo 2.

%C The positions of ones are given by A022340 and runs of zeros are given by A085407: both are related to the Fibonacci sequence.

%H Antti Karttunen, <a href="/A085405/b085405.txt">Table of n, a(n) for n = 0..65539</a>

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

%F a(n) = C(3n+2, n+1)/(3n+2) (Mod 2) = A006013(n) (Mod 2), where A006013 is the self-convolution of A001764 (ternary trees).

%F a(n) = A323239(A005940(1+n)). - _Antti Karttunen_, Jan 12 2019

%o (PARI) A085405(n) = ((binomial((3*n)+2, n+1)/((3*n)+2))%2); \\ _Antti Karttunen_, Jan 12 2019

%o (PARI) A085405(n) = if(n%2,0,while(n>0, my(nextn=(n>>1)); if(1==(nextn%2)*(n%2), return(0)); n = nextn); (1)); \\ (Much faster than above program) - _Antti Karttunen_, Jan 12 2019

%Y Cf. A005940, A006013, A022340 (ones), A085407 (zeros), A085357, A277332, A323239.

%K nonn

%O 0,1

%A _Paul D. Hanna_, Jun 29 2003