%I #7 Feb 21 2015 15:16:44
%S 1,5,4,5,25,12,4,20,69,5,25,20,25,125,52,12,60,281,4,20,97,20,100,353,
%T 69,345,448,5,25,20,25,125,60,20,100,345,25,125,100,125,625,252,52,
%U 260,1341,12,60,381,60,300,1413,281,1405
%N Number of 1's in expansion of F^n mod 3, where F = 1/x+1+x+1/y+y.
%C A255291 and A255292 together are a mod 3 analog of A072272.
%e The pairs [no. of 1's, no. of 2's] are [1, 0], [5, 0], [4, 9], [5, 0], [25, 0], [12, 37], [4, 9], [20, 45], [69, 44], [5, 0], [25, 0], [20, 45], [25, 0], [125, 0], [52, 177], [12, 37], [60, 185], [281, 156], [4, 9], [20, 45], [97, 72], [20, 45], [100, 225], [353, 228], [69, 44], [345, 220], [448, 573], [5, 0], [25, 0], [20, 45], ...
%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 F3:=1/x+1+x+1/y+y mod 3;
%p g:=(F,n)->expand(F^n) mod 3;
%p [seq(C3(g(F3,n))[1],n=0..60)];
%Y Cf. A072272, A255288-A255294.
%K nonn
%O 0,2
%A _N. J. A. Sloane_, Feb 21 2015
|