login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Number of 1's in expansion of F^n mod 3, where F = 1/x+2+x+1/y+y.
2

%I #9 Feb 21 2015 15:25:59

%S 1,4,8,4,17,29,8,37,49,4,17,37,17,76,128,29,136,196,8,37,89,37,176,

%T 292,49,260,584,4,17,37,17,76,136,37,176,260,17,76,176,76,353,605,128,

%U 613,961,29,136,332,136,653,1105,196

%N Number of 1's in expansion of F^n mod 3, where F = 1/x+2+x+1/y+y.

%C A255293 and A255294 together are a second mod 3 analog of A072272.

%e The pairs [no. of 1's, no. of 2's] are [1, 0], [4, 1], [8, 5], [4, 1], [17, 8], [29, 20], [8, 5], [37, 28], [49, 64], [4, 1], [17, 8], [37, 28], [17, 8], [76, 49], [128, 101], [29, 20], [136, 109], [196, 241], [8, 5], [37, 28], [89, 80], [37, 28], [176, 149], [292, 289], [49, 64], [260, 305], [584, 437], [4, 1], [17, 8], [37, 28], ...

%p # C3 Counts 1's and 2's

%p C3 := proc(f) local c,ix,iy,f2,i,t1,t2,n1,n2;

%p f2:=expand(f) mod 3; n1:=0; n2:=0;

%p if whattype(f2) = `+` then

%p t1:=nops(f2);

%p for i from 1 to t1 do t2:=op(i, f2); ix:=degree(t2, x); iy:=degree(t2, y);

%p c:=coeff(coeff(t2,x,ix),y,iy);

%p if (c mod 3) = 1 then n1:=n1+1; else n2:=n2+1; fi; od: RETURN([n1,n2]);

%p else ix:=degree(f2, x); iy:=degree(f2, y);

%p c:=coeff(coeff(f2,x,ix),y,iy);

%p if (c mod 3) = 1 then n1:=n1+1; else n2:=n2+1; fi; RETURN([n1,n2]);

%p fi;

%p end;

%p F4:=1/x+2+x+1/y+y mod 3;

%p g:=(F,n)->expand(F^n) mod 3;

%p [seq(C3(g(F4,n))[1],n=0..60)];

%Y Cf. A072272, A255287-A255294.

%K nonn

%O 0,2

%A _N. J. A. Sloane_, Feb 21 2015