%I #6 Jul 14 2022 09:35:11
%S 0,1,9,15,271,313,481,511,33279,34785,39993,40719,61455,61689,65409,
%T 65535,16842751,17039233,17809657,17821711,20455183,20479033,20842465,
%U 20939263,31457791,31465441,31584313,31588111,33488911,33489913,33553921,33554431,34393292799
%N For any number n with runs in binary expansion (r_w, ..., r_0), let p(n) be the polynomial of a single indeterminate x where the coefficient of x^e is r_e for e = 0..w and otherwise 0, and let q be the inverse of p; a(n) = q(p(n)^2).
%C In other words, a(n) encodes the square of the polynomial encoded by n.
%H Rémy Sigrist, <a href="/A355654/a355654.png">Binary plot of the sequence for n < 2^10</a>
%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%F A005811(a(n)) = 2*A005811(n) - 1 for any n > 0.
%F a(2^n - 1) = 2^(n^2) - 1.
%e The first terms, alongside their binary expansions and corresponding polynomials, are:
%e n a(n) bin(n) bin(a(n)) p(n) p(a(n))
%e - ----- ------ ---------------- ------------- -----------------------------
%e 0 0 0 0 0 0
%e 1 1 1 1 1 1
%e 2 9 10 1001 x + 1 x^2 + 2*x + 1
%e 3 15 11 1111 2 4
%e 4 271 100 100001111 x + 2 x^2 + 4*x + 4
%e 5 313 101 100111001 x^2 + x + 1 x^4 + 2*x^3 + 3*x^2 + 2*x + 1
%e 6 481 110 111100001 2*x + 1 4*x^2 + 4*x + 1
%e 7 511 111 111111111 3 9
%e 8 33279 1000 1000000111111111 x + 3 x^2 + 6*x + 9
%e 9 34785 1001 1000011111100001 x^2 + 2*x + 1 x^4 + 4*x^3 + 6*x^2 + 4*x + 1
%o (PARI) toruns(n) = { my (r=[]); while (n, my (v=valuation(n+n%2, 2)); n\=2^v; r=concat(v, r)); r }
%o fromruns(r) = { my (v=0); for (k=1, #r, v=(v+k%2)*2^r[k]-k%2); v }
%o a(n) = { fromruns(Vec(Pol(toruns(n))^2)) }
%Y Cf. A005811, A101211, A212739, A355653.
%K nonn,base
%O 0,3
%A _Rémy Sigrist_, Jul 12 2022
|