OFFSET
1,2
COMMENTS
Let P(m) denote the polynomial over GF(2) whose coefficients are encoded in the binary expansion of the nonnegative integer m.
Let b(1) = 1 and for any n > 0, if P(n) divides b(n) then b(n+1) = b(n) / P(n), otherwise b(n+1) = b(n) * P(n).
For any n > 0, a(n) is the unique number v such that P(v) = b(n).
LINKS
EXAMPLE
The first terms, alongside the corresponding polynomials, are:
n a(n) b(n) P(n)
-- ---- --------------------- -----------
1 1 1 1
2 2 X X
3 6 X^2 + X X + 1
4 24 X^4 + X^3 X^2
5 120 X^6 + X^5 + X^4 + X^3 X^2 + 1
6 20 X^4 + X^2 X^2 + X
7 108 X^6 + X^5 + X^3 + X^2 X^2 + X + 1
8 864 X^9 + X^8 + X^6 + X^5 X^3
9 96 X^6 + X^5 X^3 + 1
10 960 X^9 + X^8 + X^7 + X^6 X^3 + X
PROG
(PARI) P(n) = Mod(1, 2) * Pol(binary(n))
P_1(p) = fromdigits(lift(Vec(p)), 2)
{ b = 1; for (n = 1, 36, p = P(n); if (b % p==0, b \= p, b *= p); print1 (P_1(b)", "); ); }
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Jan 22 2024
STATUS
approved