|
|
A194428
|
|
Number of iterations of the map n->n/3 if n == 0 (mod 3), n->4*n+a if 4*n+a == 0 (mod 3) where a = 1 or 2, before reaching the end of the cycle.
|
|
2
|
|
|
5, 5, 5, 7, 17, 5, 16, 22, 5, 16, 20, 8, 8, 16, 18, 20, 22, 6, 16, 8, 16, 18, 20, 23, 34, 16, 6, 27, 11, 16, 18, 22, 21, 32, 16, 9, 23, 25, 9, 9, 28, 16, 20, 39, 19, 30, 16, 21, 21, 21, 23, 23, 35, 7, 26, 37, 16, 18, 37, 9, 28, 28, 16, 43, 14, 19, 19, 34, 21, 21, 33, 24
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
The problem is as follows: start with any number n. If n is divisible by 3, divide it by 3, otherwise multiply it by 4 and add 1 or 2 in order to find a new integer divisible by 3. Do we always reach the end of a cycle? It is conjectured that the answer is yes.
On the set of positive integers, the orbit of any number seems to end in the orbit of 1, or of another integer.
This problem has a resemblance with the Collatz problem.
|
|
LINKS
|
Alois P. Heinz, Table of n, a(n) for n = 1..10000
|
|
EXAMPLE
|
a(1) = 5 because 1 -> 6 -> 2 -> 9 -> 3 -> 1 with 5 iterations ;
a(2) = 5 because 2 -> 9 -> 3 -> 1-> 6 -> 2 with 5 iterations ;
a(3) = 5 because 3 -> 1 -> 6 -> 2 -> 9 -> 3 with 5 iterations ;
a(4) = 7 because 4 -> 18 -> 6 -> 2 -> 9 -> 3 -> 1 -> 6 with 7 iterations.
|
|
MAPLE
|
T:=array(1..2000):for n from 1 to 100 do: T[1]:=n:n0:=n:k:=2:for it from 1 to 50 do: z:=irem(n0, 3):if z=0 then n0:=n0/3:T[k]:=n0:k:=k+1:else n0:=4*n0 + 1:if irem(n0, 3)=0 then T[k]:=n0:k:=k+1:else n0:=n0+1:T[k]:=n0:k:=k+1:fi:fi:od:U:=convert(T, set):n1:=nops(U): printf(`%d, `, n1):od:
|
|
CROSSREFS
|
Cf. A001281.
Sequence in context: A176172 A204911 A087516 * A299695 A135089 A127310
Adjacent sequences: A194425 A194426 A194427 * A194429 A194430 A194431
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
Michel Lagneau, Aug 23 2011
|
|
STATUS
|
approved
|
|
|
|