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.

A355653 For any number n with runs in binary expansion (r_w, ..., r_0), let p(n) be the polynomial of a single indeterminate x where the coefficient of x^e is r_e for e = 0..w and otherwise 0, and let q be the inverse of p; a(n) = q(p(n)').

Original entry on oeis.org

0, 0, 1, 0, 1, 6, 3, 0, 1, 12, 57, 6, 3, 30, 7, 0, 1, 24, 225, 12, 57, 966, 115, 6, 3, 60, 505, 30, 7, 126, 15, 0, 1, 48, 897, 24, 225, 7686, 451, 12, 57, 1932, 31801, 966, 115, 3870, 231, 6, 3, 120, 2017, 60, 505, 16326, 1011, 30, 7, 252, 4089, 126, 15, 510
Offset: 0

Views

Author

Rémy Sigrist, Jul 12 2022

Keywords

Comments

In other words, a(n) encodes the derivative of the polynomial encoded by n.
For n > 0, the runs in binary expansion of a(n) are (w*r_w, ..., 1*r_1).

Examples

			The first terms, alongside their binary expansions and corresponding polynomials, are:
  n   a(n)  bin(n)  bin(a(n))  p(n)               p(a(n))
  --  ----  ------  ---------  -----------------  ---------------
   0     0       0          0                  0                0
   1     0       1          0                  1                0
   2     1      10          1              x + 1                1
   3     0      11          0                  2                0
   4     1     100          1              x + 2                1
   5     6     101        110        x^2 + x + 1          2*x + 1
   6     3     110         11            2*x + 1                2
   7     0     111          0                  3                0
   8     1    1000          1              x + 3                1
   9    12    1001       1100      x^2 + 2*x + 1          2*x + 2
  10    57    1010     111001  x^3 + x^2 + x + 1  3*x^2 + 2*x + 1
  11     6    1011        110        x^2 + x + 2          2*x + 1
  12     3    1100         11            2*x + 2                2
  13    30    1101      11110      2*x^2 + x + 1          4*x + 1
		

Crossrefs

Programs

  • PARI
    toruns(n) = { my (r=[]); while (n, my (v=valuation(n+n%2, 2)); n\=2^v; r=concat(v, r)); r }
    fromruns(r) = { my (v=0); for (k=1, #r, v=(v+k%2)*2^r[k]-k%2); v }
    a(n) = { fromruns(Vec(deriv(Pol(toruns(n))))) }

Formula

a^A005811(n)(n) = 0 (where a^k denotes the k-th iterate of a).
a(n) = 0 iff n belongs to A000225.
a(n) = 1 iff n = 2^k for some k > 0.
A005811(a(n)) = A005811(n)-1 for any n > 0.