login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A274036 a(n) is the thickness of n (see Comments section for definition). 3

%I #49 Jun 17 2016 09:00:59

%S 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,

%T 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,

%U 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

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

%C 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).

%C 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}.

%C In general a(n) <= A000120(n), with equality only if in base-2 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,w-1), i.e., A207974(n,w-1) = 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.

%H Gheorghe Coserea, <a href="/A274036/b274036.txt">Table of n, a(n) for n = 0..32768</a>

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

%e 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.

%e 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.

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

%o (PARI)

%o a(n) = my(pol = Pol(binary(n))); return(vecmax(Vec(sqr(pol))));

%o concat(0, vector(100, n, a(n)))

%o (PARI)

%o bitrev(n) = subst(Pol(Vecrev(binary(n>>valuation(n,2))), 'x), 'x, 2);

%o a(n) = {

%o my(e = logint(n, 2), r = bitrev(n) << e, v = vector(2*e+1));

%o for (i = 1, #v, v[i] = hammingweight(bitand(r, n)); r >>= 1);

%o return(vecmax(v));

%o };

%o concat(0, vector(100, n, a(n)))

%Y Cf. A000120, A027383, A057890, A169950, A207974.

%K nonn,base

%O 0,4

%A _Gheorghe Coserea_, Jun 07 2016

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 13 22:05 EDT 2024. Contains 375910 sequences. (Running on oeis4.)