OFFSET
0,3
COMMENTS
If p(x) is a fixed point then P(x):=(x+x^2)*p(x) and P(x)+1 are also fixed points.
LINKS
Joerg Arndt, Matters Computational (The Fxtbook), section 1.19.3 "Fixed points of the blue code", p.52-54
EXAMPLE
a(4)=18 corresponds to the polynomial p(x)=x^4+x (18 is 10010 in binary).
p(x+1) = (x+1)^4 + (x+1) = x^4 + 4*x^3 + 6*x^2 + 5*x + 2 = x^4+x = p(x);
PROG
(C++) /* Returns a unique fixed point for each argument: */
ulong A(ulong s)
{
if ( 0==s ) return 0;
ulong f = 1;
while ( s>1 ) { f ^= (f<<1); f <<= 1; f |= (s&1); s >>= 1; }
return f;
}
/* the elements are not produced in increasing order, but as follows:
0 1 6 7 20 18 21 19 120 108 126 106 121 109 127 107 272 360 ... */
CROSSREFS
KEYWORD
nonn
AUTHOR
Joerg Arndt, May 19 2006, May 20 2006
STATUS
approved