login
Number of zeros in row n of triangle A249223.
1

%I #26 Jan 18 2021 13:10:09

%S 0,0,1,0,1,0,2,0,1,1,3,0,3,1,1,0,4,0,4,0,2,3,5,0,3,3,2,0,6,0,6,0,3,4,

%T 3,0,7,5,4,0,7,0,7,1,1,6,8,0,5,1,5,2,8,0,4,0,6,7,9,0,9,7,2,0,4,0,10,4,

%U 7,1,10,0,10,8,3,4,5,1,11,0,4,9,11,0,6,9,8,0,11,0,5,6,9

%N Number of zeros in row n of triangle A249223.

%C Equivalently, half the number of zeros in row n of A262045.

%H N. J. A. Sloane, <a href="/A340502/b340502.txt">Table of n, a(n) for n = 1..512</a>

%F a(k) = 0 iff A237271(k) = 1.

%F If p is an odd prime, a(p) = A003056(p) - 1 and a(p^2) = p - 2.

%p r := proc(n) floor((sqrt(1+8*n)-1)/2) ; end proc: # A003056

%p A237048:=proc(n,k) local i; global r;

%p if n<(k-1)*k/2 or k>r(n) then return(0); fi;

%p if (k mod 2)=1 and (n mod k)=0 then return(1); fi;

%p if (k mod 2)=0 and ((n-k/2) mod k) = 0 then return(1); fi;

%p return(0);

%p end;

%p A249223:=proc(n,k) local i; global r,A237048;

%p if n<(k-1)*k/2 or k>r(n) then return(0); fi;

%p add( (-1)^(i+1)*A237048(n,i),i=1..k);

%p end;

%p A340502 := proc(n) local ct,k; global r,A249223;

%p ct:=0;

%p for k from 1 to r(n) do if A249223(n,k)=0 then ct:=ct+1; fi; od:

%p ct;

%p end;

%Y Cf. A003056, A235791, A237048, A237271, A237593, A249223, A262045.

%K nonn

%O 1,7

%A _N. J. A. Sloane_, Jan 15 2021