cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A255294 #4 Feb 21 2015 15:28:10
%S A255294 0,1,5,1,8,20,5,28,64,1,8,28,8,49,101,20,109,241,5,28,80,28,149,289,
%T A255294 64,305,437,1,8,28,8,49,109,28,149,305,8,49,149,49,272,524,101,532,
%U A255294 1096,20,109,305,109,572,1096,241,1160
%N A255294 Number of 2's in expansion of F^n mod 3, where F = 1/x+2+x+1/y+y.
%C A255294 A255293 and A255294 together are a second mod 3 analog of A072272.
%e A255294 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 A255294 # C3 Counts 1's and 2's
%p A255294 C3 := proc(f) local c,ix,iy,f2,i,t1,t2,n1,n2;
%p A255294 f2:=expand(f) mod 3; n1:=0; n2:=0;
%p A255294 if whattype(f2) = `+` then
%p A255294 t1:=nops(f2);
%p A255294 for i from 1 to t1 do t2:=op(i, f2); ix:=degree(t2, x); iy:=degree(t2, y);
%p A255294 c:=coeff(coeff(t2,x,ix),y,iy);
%p A255294 if (c mod 3) = 1 then n1:=n1+1; else n2:=n2+1; fi; od: RETURN([n1,n2]);
%p A255294 else ix:=degree(f2, x); iy:=degree(f2, y);
%p A255294 c:=coeff(coeff(f2,x,ix),y,iy);
%p A255294 if (c mod 3) = 1 then n1:=n1+1; else n2:=n2+1; fi; RETURN([n1,n2]);
%p A255294 fi;
%p A255294 end;
%p A255294 F4:=1/x+2+x+1/y+y mod 3;
%p A255294 g:=(F,n)->expand(F^n) mod 3;
%p A255294 [seq(C3(g(F4,n))[2],n=0..60)];
%Y A255294 Cf. A072272, A255287-A255294.
%K A255294 nonn
%O A255294 0,3
%A A255294 _N. J. A. Sloane_, Feb 21 2015