This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A274036 #49 Jun 17 2016 09:00:59 %S A274036 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 A274036 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 A274036 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 A274036 a(n) is the thickness of n (see Comments section for definition). %C A274036 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 A274036 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 A274036 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 A274036 Gheorghe Coserea, <a href="/A274036/b274036.txt">Table of n, a(n) for n = 0..32768</a> %F A274036 a(n) <= A000120(n), with equality iff n = A057890(k). %e A274036 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 A274036 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 A274036 Table[Max@ CoefficientList[#, x] &[SeriesData[x, 0, #, 0, Length@ #, 1]^2] &@ Reverse@ IntegerDigits[n, 2], {n, 120}] (* _Michael De Vlieger_, Jun 08 2016 *) %o A274036 (PARI) %o A274036 a(n) = my(pol = Pol(binary(n))); return(vecmax(Vec(sqr(pol)))); %o A274036 concat(0, vector(100, n, a(n))) %o A274036 (PARI) %o A274036 bitrev(n) = subst(Pol(Vecrev(binary(n>>valuation(n,2))), 'x), 'x, 2); %o A274036 a(n) = { %o A274036 my(e = logint(n, 2), r = bitrev(n) << e, v = vector(2*e+1)); %o A274036 for (i = 1, #v, v[i] = hammingweight(bitand(r, n)); r >>= 1); %o A274036 return(vecmax(v)); %o A274036 }; %o A274036 concat(0, vector(100, n, a(n))) %Y A274036 Cf. A000120, A027383, A057890, A169950, A207974. %K A274036 nonn,base %O A274036 0,4 %A A274036 _Gheorghe Coserea_, Jun 07 2016