login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A264811 Number of steps needed to reach 1 or to enter the cycle in the double '3x+1' and '5x+1' problem. 1
11, 12, 6, 13, 13, 7, 5, 14, 5, 14, 27, 8, 5, 5, 13, 15, 27, 5, 39, 14, 15, 28, 34, 9, 15, 5, 46, 5, 8, 14, 58, 16, 22, 28, 28, 5, 8, 40, 14, 11, 20, 16, 23, 29, 29, 35, 28, 10, 41, 16, 64, 6, 8, 47, 12, 5, 53, 9, 53, 15, 15, 59, 17, 17, 88, 23, 23, 29, 29, 29 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
The double '3x+1' and '5x+1' problem is as follows: start with any number n.
Step 1: if n is even, divide it by 2 until the result becomes odd, otherwise multiply it by 3 and add 1. Let r1 denote the result after respective computation.
Step 2: if the result r1 of step 1 is even, divide it by 2 until the result becomes odd, and then multiply it by 5 and add 1. If the result of step 1 is odd, multiply it by 5 and add 1. Let r2 denote the result after respective computation.
Step 3: go to step 1 with n=r2 and continue until stabilization.
It is conjectured that the process always stabilize.
Starting from any positive n, we call the sequence of iterates (n, T(n,1), T(n,2), ..., T(n,k), ...) the trajectory of n. There are three possible behaviors for such trajectories when n>0:
(i) Convergent trajectory. Some T(n,k) = 1.
(ii) Nontrivial cyclic trajectory. The sequence T(n,k) eventually becomes periodic and T(n,k) is different from 1 for any k>=1.
(iii) Divergent trajectory (it is conjectured that this behavior cannot occur).
LINKS
EXAMPLE
a(1)=11 because the number 1 generates the trajectory 1 -> 4 -> 2 -> 1 -> 6 -> 3 -> 10 -> 5 -> 26 -> 13 -> 40 -> 20 where the number 20 is the last term of the cycle because the following terms 20/2 = 10 -> 5 -> 26 -> 13 -> 40 are already in the trajectory.
MAPLE
for n from 1 to 90 do:nn:=5000:T:=array(1..nn):kk:=1:
lst:={n}:m:=n:it:=0:indic:=0:m0:=n:T[1]:=n:
for i from 2 to nn do:
if irem(m, 2)=0
then m:=m/2:kk:=kk+1:T[kk]:=m:lst:=lst union {m}:it:=it+1:
else
if indic=0
then m:=3*m+1:kk:=kk+1:T[kk]:=m:lst:=lst union {m}:it:=it+1:indic:=1:
else
m:=5*m+1:it:=it+1:kk:=kk+1:T[kk]:=m:lst:=lst union {m}:indic:=0:
fi:
fi:
od:
n0:=nops(lst):ii:=0:
for a from n0 to nn while (ii=0) do:
q:=T[a]:it:=0:
for b from a-1 by -1 to 1 while (ii=0)do:
it:=it+1:
if q=T[b] and q=T[b+it]
then
ii:=1: printf(`%d, `, a-2):
else
fi:
od:
od:
od:
CROSSREFS
Cf. A006577.
Sequence in context: A342076 A329127 A076654 * A352389 A020510 A291521
KEYWORD
nonn
AUTHOR
Michel Lagneau, Nov 25 2015
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 10:11 EDT 2024. Contains 371935 sequences. (Running on oeis4.)