login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A261814
a(n) = smallest initial value s such that n is in the Collatz trajectory of s (s is not regarded as part of its trajectory).
1
2, 3, 6, 3, 3, 12, 9, 3, 18, 3, 7, 24, 7, 9, 30, 3, 7, 36, 25, 7, 42, 7, 15, 48, 33, 7, 54, 9, 19, 60, 27, 21, 66, 7, 15, 72, 43, 25, 78, 7, 27, 84, 57, 19, 90, 15, 27, 96, 43, 33, 102, 7, 15, 108, 73, 37, 114, 19, 39, 120, 27, 27, 126, 21, 43, 132, 39, 45
OFFSET
1,1
COMMENTS
The initial term is not counted as an element of the trajectory.
For even n obviously a(n) <= 2n, because the halving step would reach n. - R. J. Mathar, Nov 27 2015
LINKS
EXAMPLE
a(1)=2 because the number 1 is in the trajectory 2 -> 1;
a(2)=3 because the number 2 is in the trajectory 3 -> 10 -> 5 -> ... -> 2 -> 1;
a(3)=6 because the number 3 is in the trajectory 6 -> 3 -> 10 -> ... -> 1;
a(4)=3 because the number 4 is in the trajectory 3 -> 10 -> 5 -> ... -> 4 -> 2 -> 1.
MAPLE
Collatz := proc(n)
if type(n, 'even') then
n/2;
else
3*n+1 ;
end if;
end proc:
CollatzTrj := proc(x, membSrch)
local t;
t := x ;
while t <> 1 do
t := Collatz(t) ;
if t = membSrch then
return true ;
end if;
end do:
return false;
end proc:
A261814 := proc(n)
for x from 2 do
if CollatzTrj(x, n) then
return x;
end if;
end do;
end proc: # R. J. Mathar, Nov 27 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Nov 22 2015
STATUS
approved