OFFSET
0,1
COMMENTS
Conjectured: No term of the sequence is equal to a previous term.
EXAMPLE
7 is odd, so it is followed by 7*7 + 1 = 50.
50 is even, so it is followed by 50/2 = 25.
MATHEMATICA
NestList[If[EvenQ[#], #/2, 7 # + 1]&, 7, 60]
PROG
(Magma) [n eq 1 select 7 else IsOdd(Self(n-1)) select 7*Self(n-1)+1 else Self(n-1) div 2: n in [1..60]];
(PARI) Collatz(n, lim=0) = {my(c=n, e=0, L=List(n)); if(lim==0, e=1; lim=n*10^2);
for(i=1, lim, if(c%2==0, c=c/2, c=7*c+1); listput(L, c); if(e&&c==1, break)); return(Vec(L)); }
print(Collatz(7)) \\ Adapted from A008884 \\ Altug Alkan, Apr 11 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Apr 11 2016
STATUS
approved