|
|
A355654
|
|
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)^2).
|
|
3
|
|
|
0, 1, 9, 15, 271, 313, 481, 511, 33279, 34785, 39993, 40719, 61455, 61689, 65409, 65535, 16842751, 17039233, 17809657, 17821711, 20455183, 20479033, 20842465, 20939263, 31457791, 31465441, 31584313, 31588111, 33488911, 33489913, 33553921, 33554431, 34393292799
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
In other words, a(n) encodes the square of the polynomial encoded by n.
|
|
LINKS
|
|
|
FORMULA
|
a(2^n - 1) = 2^(n^2) - 1.
|
|
EXAMPLE
|
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 1 1 1 1 1
2 9 10 1001 x + 1 x^2 + 2*x + 1
3 15 11 1111 2 4
4 271 100 100001111 x + 2 x^2 + 4*x + 4
5 313 101 100111001 x^2 + x + 1 x^4 + 2*x^3 + 3*x^2 + 2*x + 1
6 481 110 111100001 2*x + 1 4*x^2 + 4*x + 1
7 511 111 111111111 3 9
8 33279 1000 1000000111111111 x + 3 x^2 + 6*x + 9
9 34785 1001 1000011111100001 x^2 + 2*x + 1 x^4 + 4*x^3 + 6*x^2 + 4*x + 1
|
|
PROG
|
(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(Pol(toruns(n))^2)) }
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|