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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A277068 a(n) = gcd(s1, s2), where s1 is the sum of the odd numbers and s2 is the sum of the even numbers in the Collatz (3x+1)trajectory of n. 3
 1, 1, 1, 1, 6, 1, 18, 1, 3, 2, 1, 1, 1, 2, 2, 1, 2, 21, 1, 6, 2, 1, 3, 1, 2, 1, 2, 6, 2, 4, 2, 1, 1, 4, 2, 3, 1, 1, 2, 2, 3, 2, 2, 1, 1, 1, 1, 1, 2, 12, 2, 1, 1, 2, 2, 2, 1, 4, 3, 4, 2, 2, 2, 1, 5, 1, 1, 4, 2, 2, 2, 3, 1, 7, 2, 1, 1, 2, 2, 6, 7, 1, 1, 2, 2, 8 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,5 COMMENTS Statistics of a(n) for the first 10^6 terms: +------+-----------------+------------+ |      | number of terms |            | |      |    such that    |            | |   n  | gcd(s1, s2) = n | percentage | +------+-----------------+------------+ |    1 |     401614      |   40.16%   | |    2 |     305471      |   30.54%   | |    3 |      44381      |    4.44%   | |    4 |      76228      |    7.62%   | |    5 |      15966      |    1.60%   | |    6 |      34514      |    3.45%   | |    7 |       8969      |    0.90%   | |    8 |      19156      |    1.92%   | |    9 |       4941      |    0.49%   | |   10 |      12212      |    1.22%   | |   11 |       3316      |    0.33%   | |   12 |       8234      |    0.82%   | | > 12 |      64998      |    6.50%   | +------+-----------------+------------+ It seems that the values of the third column oscillate infinitely when n tend towards infinity. Records: 1, 6, 18, 21, 23, 93, 187, 560, 1730, 5098, 10552, 11060, 11657, 31072, 32468, 306770, 793906, 1956888, 3107101, 12210181, etc.; they appear at 1, 5, 7, 18, 133, 147, 186, 270, 839, 5090, 5244, 5488, 23255, 62132, 113624, 153341, 793842, 6849034, 9321240, 12210146, etc. - Robert G. Wilson v, Oct 03 2016 LINKS Michel Lagneau, Table of n, a(n) for n = 1..10000 Robert G. Wilson v, The first occurrence of a(n) EXAMPLE a(5)=6 because the Collatz trajectory of 5 is 5 -> 16 -> 8 -> 4 -> 2 -> 1 => s1 = 5+1 = 6, s2 = 16+8+4+2 = 30, and gcd(6, 30) = 6. MAPLE nn:=10^7: for n from 1 to 100 do:   m:=n:s1:=0:s2:=0:    for i from 1 to nn while(m<>1) do:     if irem(m, 2)=0      then      s2:=s2+m:m:=m/2:      else      s1:=s1+m:m:=3*m+1:     fi:    od:      x:=gcd(s1+1, s2): printf(`%d, `, x):   od: MATHEMATICA Collatz[n_] := NestWhileList[ If[ OddQ[#], 3#+1, #/2] &, n, # > 1 &]; f[n_] := Block[{c = Collatz@ n}, GCD[Plus @@ Select[c, OddQ], Plus @@ Select[c, EvenQ]]]; Array[f, 86] (* Robert G. Wilson v, Oct 03 2016 *) PROG (PARI) a(n) = {my(se = 0); my(so = 0); while (n!=1, if (n % 2, so+=n; n = 3*n+1, se +=n; n = n/2); ); gcd(se, so+1); } \\ Michel Marcus, Oct 03 2016 CROSSREFS Cf. A213909, A213916, A271973. Sequence in context: A281413 A049325 A250646 * A092371 A187552 A157386 Adjacent sequences:  A277065 A277066 A277067 * A277069 A277070 A277071 KEYWORD nonn AUTHOR Michel Lagneau, Sep 28 2016 STATUS approved

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.

Last modified May 20 06:37 EDT 2022. Contains 353852 sequences. (Running on oeis4.)