OFFSET
1,1
COMMENTS
From Collatz conjecture, the trajectory of n never reaches n again. Is this sequence finite?
There are no more terms < 10^9. - Donovan Johnson, Sep 22 2013
EXAMPLE
Trajectory of 39 is: (118, 59, 178, 89, 268, 134, 67, 202, 101, 304, 152, 76, 38, 19, 58, 29, 88, 44, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1) and 39-1 = 38 is reached, hence 39 is in the sequence.
MATHEMATICA
Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; Select[Range[100000], MemberQ[Collatz[#], # - 1] &] (* T. D. Noe, Feb 21 2013 *)
PROG
(PARI) for(n=1, 10000, s=n; t=0; while(s!=1, t++; if(s%2==0, s=s/2, s=3*s+1); if(s==n-1, print1(n, ", "); ); ))
(Haskell)
a070991 n = a070991_list !! (n-1)
a070991_list = filter (\x -> (x - 1) `elem` a070165_row x) [1..]
-- Reinhard Zumkeller, Feb 22 2013
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Benoit Cloitre and Boris Gourevitch (boris(AT)pi314.net), May 18 2002
STATUS
approved