



7, 2, 5, 3, 19, 17, 17, 7, 7, 23, 5, 13, 13, 109, 29, 11, 11, 11, 19, 19, 19, 19, 107, 107, 17, 17, 17, 17, 113, 113, 113, 7, 41, 41, 103, 103, 23, 23, 23, 23, 23, 23, 23, 67, 31, 31, 31, 31, 31, 31, 13, 13, 13, 13, 101, 101, 13, 13, 127, 83, 127, 47, 47, 109, 47, 109, 109
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


LINKS



EXAMPLE



MAPLE

N:= 1000; # to get the first N terms
Collatz:= proc(n) option remember;
if n::even then 1+Collatz(n/2)
else 1+Collatz(3*n+1)
fi
end proc;
Collatz(1):= 0;
count:= 0;
for i from 1 while count < N do
x:= Collatz(i);
if isprime(x) then count:= count+1; A[count]:= x fi;
od:


MATHEMATICA

M = 100;
Collatz[n_] := Collatz[n] = If[EvenQ[n], 1+Collatz[n/2], 1+Collatz[3n+1]];
Collatz[1] = 0;
count = 0;
For[i = 1, count < M, i++, x = Collatz[i]; If[PrimeQ[x], count = count+1; a[count] = x]];


CROSSREFS



KEYWORD



AUTHOR

K. B. Subramaniam (kb_subramaniambalu(AT)yahoo.com), Dec 20 2001


EXTENSIONS



STATUS

approved



