%I #7 Mar 30 2012 17:35:24
%S 0,1,2,2,16,16,18,19,512,584,674,749,912,973,770,856,65536,65536,
%T 65538,65539,65552,65553,65554,65554,69120,69465,68834,69052,68240,
%U 68572,67650,67849,33554432,34603040,35652098,36700721,37756944,38805813,39854162,40903012,42084864,43138625,44171426,45225206,46289296,47334592,48396610,49441799,52494336
%N Self-composition of binary encoding of GF(2) polynomial.
%e 7, 111 in base 2, is transformed to the polynomial x^2+x+1. Composing this with itself (mod 2) gives (x^2+x+1)^2 + (x^2+x+1) + 1 = x^4+x+1, which transforms back to 19; so a(7) = 19.
%o (PARI) tox(n) = local(x=Mod(1,2)*X, xp=1, r); while(n>0,if(n%2,r+=xp);xp*=x;n\=2);r
%o a(n) = local(p); p=tox(n);subst(lift(subst(p,X,p)),X,2)
%Y Cf. A048720, A000695.
%K nonn
%O 0,3
%A _Franklin T. Adams-Watters_, Jul 16 2011
|