login
A109174
Number of steps to reach 1 in the modified `3x+1'-type problem defined by: If a_n is even then a_(n+1) = a_n/2. If a_n is = 1 (mod 4) then a_(n+1) = 3a_n+1. If a_n is = 3 (mod 4) then a_(n+1) = 3a_n-1.
0
0, 1, 4, 2, 5, 5, 8, 3, 11, 6, 6, 6, 9, 9, 9, 4, 12, 12, 12, 7, 7, 7, 15, 7, 15, 10, 10, 10, 10, 10, 18, 5, 18, 13, 13, 13, 13, 13, 13, 8, 21, 8, 8, 8, 16, 16, 16, 8, 16, 16, 16, 11, 11, 11, 24, 11, 11, 11, 11, 11, 19, 19, 19, 6, 19, 19, 19, 14, 14, 14, 14, 14, 27, 14, 14, 14, 14, 14, 14
OFFSET
1,3
COMMENTS
The sequence will reach 1 regardless of which natural number is chosen as a_0.
EXAMPLE
If a_0 = 3 then a_1 = 3*a_0-1 = 8, a_2 = a_1/2 = 4, a_3 = a_2/2 = 2, a_4 = a_3/2 = 1. And so the third term in the sequence is 4.
CROSSREFS
Cf. A006577.
Sequence in context: A010647 A021239 A112963 * A160211 A035584 A241132
KEYWORD
nonn
AUTHOR
Douglas Stones (dssto1(AT)student.monash.edu.au), Aug 19 2005
STATUS
approved