OFFSET
1,1
LINKS
FORMULA
a(n) = A070991(n+2) - 1.
EXAMPLE
a(1) = 5 because the orbit started at 6 = a(1) + 1 reaches 5:
6 -> 3 -> 10 -> 5;
a(2) = 8 because the orbit started at 9 = a(2) + 1 reaches 8:
9 -> 28 -> 14 -> 7 -> 22 -> 11 -> 34 -> 17 -> 52 -> 26 -> 13 -> 40 -> 20 -> 10 -> 5 -> 16 -> 8;
a(3) = 10 because the orbit started at 11 = a(3) + 1 reaches 10:
11 -> 34 -> 17 -> 52 -> 26 -> 13 -> 40 -> 20 -> 10.
PROG
(PARI) collatz(start, target) = {my(old=start, new=0); while (new!=target && new!=1, if(old%2==0, new=old/2, new=3*old+1); old=new); new>1};
for (k=5, 10000, if(collatz(k+1, k), print1(k, ", ")))
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Hugo Pfoertner, Jul 10 2022
STATUS
approved