OFFSET
1,6
COMMENTS
Recall the modified Collatz map: x->x/2 if x is even; x->(3x+1)/2 if x is odd. Let C_m(n) denotes the image of n after m iterations. Then b(n) = (lim_{k->infinity} C_2k(n))-1 (from the Collatz conjecture C_2k(n) is constant = 1 or 2 for k sufficiently large).
Curiously the graph of a(n) has "regularities" around 0 and a pattern that becomes larger and larger when compared with a random sequence of the form n - 2*Sum_{k=1..n} r(k) where r(k) takes random values from (0;1).
LINKS
Hugo Pfoertner, Table of n, a(n) for n = 1..10000
EXAMPLE
b(12)=1 since, starting with 12, the Collatz map gives: 12->6->3->5->8->4->2->1, then C_6(12)=2 and then b(12) = C_6(12)-1 = 1.
PROG
(PARI) a(n)=n-2*sum(i=1, n, if(i<0, 0, s=i; c=0; while(s>1, s=(s%2)*(3*s+1)/2+(1-s%2)*s/2; c++); c)%2)
CROSSREFS
KEYWORD
sign,look
AUTHOR
Benoit Cloitre, Nov 01 2002
STATUS
approved