login
A087258
a(n) = gcd(n, A025586(n)), greatest common divisor of n and largest value in 3x+1 iteration list started at n.
1
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, 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, 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
OFFSET
1,2
MATHEMATICA
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}]
PROG
(PARI)
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
A087258(n) = gcd(n, A025586(n)); \\ Antti Karttunen, Dec 05 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Sep 09 2003
STATUS
approved