login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A087258 a(n) = gcd(n, A025586(n)), greatest common divisor of n and largest value in 3x+1 iteration list started at n. 1

%I #13 Dec 05 2018 17:23:11

%S 1,2,1,4,1,2,1,8,1,2,1,4,1,2,5,16,1,2,1,20,1,2,1,24,1,2,1,4,1,10,1,32,

%T 1,2,5,4,1,2,1,40,1,2,1,4,1,2,1,48,1,2,1,52,1,2,1,56,1,2,1,20,1,2,1,

%U 64,1,2,1,68,1,10,1,72,1,2,5,4,1,2,1,80,1,2,1,84,1,2,1,88,1,2,1,4,1,2,1,96,1

%N a(n) = gcd(n, A025586(n)), greatest common divisor of n and largest value in 3x+1 iteration list started at n.

%H Antti Karttunen, <a href="/A087258/b087258.txt">Table of n, a(n) for n = 1..16384</a>

%H Antti Karttunen, <a href="/A087258/a087258.txt">Data supplement: n, a(n) computed for n = 1..100000</a>

%H <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a>

%t c[x_] := (1-Mod[x, 2])*(x/2)+Mod[x, 2]*(3*x+1)c[1]=1; fpl[x_] := Delete[FixedPointList[c, x], -1] Table[GCD[w, Max[fpl[w]]], {w, 1, 256}]

%o (PARI)

%o A025586(n) = { my(r=n); while(n>2, if(n%2, n=3*n+1; if(n>r, r=n), n/=2)); (r); }; \\ From A025586

%o A087258(n) = gcd(n,A025586(n)); \\ _Antti Karttunen_, Dec 05 2018

%Y Cf. A006370, A025586, A033496, A087259, A087260, A087262.

%K nonn

%O 1,2

%A _Labos Elemer_, Sep 09 2003

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 10:55 EDT 2024. Contains 371241 sequences. (Running on oeis4.)