login
A350082
Smallest odd number > n with n in its Collatz successors, or 0 if no such odd number exists. a(1) = 1.
1
1, 3, 0, 5, 7, 0, 9, 9, 0, 11, 19, 0, 17, 37, 0, 17, 19, 0, 25, 23, 0, 25, 27, 0, 33, 29, 0, 37, 33, 0, 41, 75, 0, 37, 41, 0, 43, 39, 0, 41, 109, 0, 57, 51, 0, 47, 55, 0, 57, 133, 0, 57, 55, 0, 73, 57, 0, 59, 123, 0, 63, 109, 0, 75, 115, 0, 89, 181, 0, 71, 73
OFFSET
1,2
COMMENTS
a(n) = 0 when n == 0 (mod 3) since such an n has no odd predecessor (only n*2^x). But n !== 0 (mod 3) always has some odd predecessor > n.
EXAMPLE
a(2) = 3, because 3 is the smallest odd number > 2 that has 2 as a successor: 3 -> 10 -> 5 -> 16 -> 8 -> 4 -> 2.
a(3) = 0 because 3 is not a successor of anything. A060565 contains no 3, nor multiples of 3.
a(11) = 19, because the trajectories of 13, 15, 17 don't contain 11, and 11 is a successor of 19:
13 -> 40..5 -> 16..1;
15 -> 46..23 -> 70..35 -> 106..53 -> 160..5 -> 16..1;
17 -> 52..13;
19 -> 58..29 -> 88..11.
PROG
(PARI) a(n)= if(1==n, return(1)); if(!(n%3), return(0)); my(v0=if(n%2, n+2, n+1)); while(1, my(v=v0); while(v>1 && v!=n, v=if(v%2, 3*v+1, v/2)); if(v==n, return(v0)); v0+=2)
CROSSREFS
Cf. A060565.
Sequence in context: A308089 A249859 A213724 * A362241 A019915 A052123
KEYWORD
nonn
AUTHOR
Ruud H.G. van Tol, Jan 22 2022
STATUS
approved