

A274036


a(n) is the thickness of n (see Comments section for definition).


3



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
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,4


COMMENTS

Let b_k..b_0 be the binary representation of n and B_n(x) = b_k*x^k + .. + b_0 the associated polynomial with n = B_n(2); we define the thickness of n to be the thickness of B_n, i.e., the magnitude of the largest coefficient in the expansion of B_n(x)^2 (see A169950).
The thickness histogram for numbers in the interval I_n = [2^n, 2^(n+1)1] is given by row n of triangle A169950, i.e., A169950(n,k) = card {p, p in I_n and a(p) = k}.
In general a(n) <= A000120(n), with equality only if in base2 n becomes a palindrome after trailing 0's (if any) are omitted, i.e., n = A057890(k) for some k; the number of such numbers in I_n having binary weight (and thickness) w is given by A207974(n,w1), i.e., A207974(n,w1) = card {k, A057890(k) in I_n and A000120(A057890(k)) = w}; the total number of these numbers in the interval I_n is given by A027383(n), i.e., card {p, p in I_n and a(p) = A000120(p)} = A027383(n) = 2^floor((n+2)/2) + 2^floor((n+1)/2)  2.


LINKS

Gheorghe Coserea, Table of n, a(n) for n = 0..32768


FORMULA

a(n) <= A000120(n), with equality iff n = A057890(k).


EXAMPLE

For n = 3 we have the base2 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 base2 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.


MATHEMATICA

Table[Max@ CoefficientList[#, x] &[SeriesData[x, 0, #, 0, Length@ #, 1]^2] &@ Reverse@ IntegerDigits[n, 2], {n, 120}] (* Michael De Vlieger, Jun 08 2016 *)


PROG

(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)))


CROSSREFS

Cf. A000120, A027383, A057890, A169950, A207974.
Sequence in context: A211097 A354907 A086342 * A194449 A261923 A124736
Adjacent sequences: A274033 A274034 A274035 * A274037 A274038 A274039


KEYWORD

nonn,base


AUTHOR

Gheorghe Coserea, Jun 07 2016


STATUS

approved



