A274036 a(n) is the thickness of n (see Comments section for definition).
0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 2, 2, 2, 3, 4, 1, 2, 2, 2, 2, 3, 2, 3, 2, 2, 2, 4, 3, 3, 4, 5, 1, 2, 2, 2, 2, 2, 2, 3, 2, 2, 3, 3, 2, 4, 3, 4, 2, 2, 2, 4, 2, 3, 4, 4, 3, 3, 3, 4, 4, 4, 5, 6, 1, 2, 2, 2, 2, 2, 2, 3, 2, 3, 2, 3, 2, 3, 3, 4, 2, 2, 2, 2, 3, 4, 3, 4, 2, 3, 4, 4, 3, 5, 4, 5, 2, 2, 2, 4, 2
Offset: 0
Examples
For n = 3 we have the base-2 representation 11, the associated polynomial B_3(x) = x + 1, B_3(x)^2 = x^2 + 2*x + 1 and the magnitude of the largest coefficient in the expansion of B_3(x)^2 is 2, therefore a(3) = 2. For n = 4 we have the base-2 representation 100, the associated polynomial B_4(x) = x^2, B_4(x)^2 = x^4 and the magnitude of the largest coefficient in the expansion of B_4(x)^2 is 1, therefore a(4) = 1.
Links
- Gheorghe Coserea, Table of n, a(n) for n = 0..32768
Programs
-
Mathematica
Table[Max@ CoefficientList[#, x] &[SeriesData[x, 0, #, 0, Length@ #, 1]^2] &@ Reverse@ IntegerDigits[n, 2], {n, 120}] (* Michael De Vlieger, Jun 08 2016 *)
-
PARI
a(n) = my(pol = Pol(binary(n))); return(vecmax(Vec(sqr(pol)))); concat(0, vector(100, n, a(n)))
-
PARI
bitrev(n) = subst(Pol(Vecrev(binary(n>>valuation(n,2))), 'x), 'x, 2); a(n) = { my(e = logint(n, 2), r = bitrev(n) << e, v = vector(2*e+1)); for (i = 1, #v, v[i] = hammingweight(bitand(r, n)); r >>= 1); return(vecmax(v)); }; concat(0, vector(100, n, a(n)))
Comments