cp's OEIS Frontend

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.

Showing 1-1 of 1 results.

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

Original entry on oeis.org

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

Views

Author

Gheorghe Coserea, Jun 07 2016

Keywords

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

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.
		

Crossrefs

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

Formula

a(n) <= A000120(n), with equality iff n = A057890(k).
Showing 1-1 of 1 results.