A281195 Numbers m such that gcd(s1,s2) = number of the Collatz iterations of m where s1 is the sum of the odd terms and s2 the sum of the even terms in the Collatz trajectory.
2, 808, 4801, 10408, 14661, 25072, 34338, 39328, 40384, 45902, 62627, 78547, 79134, 108674, 113264, 113474, 125310, 125344, 144172, 152949, 158979, 159382, 173034, 176778, 209202, 219920, 226565, 230090, 231350, 232207, 243482, 248389, 291200, 300364, 309406
Offset: 1
Keywords
Examples
808 is in the sequence because the Collatz trajectory is given by the 28 terms of the set {808 404 202 101 304 152 76 38 19 58 29 88 44 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1}. The sum of the even terms is 2408, the sum of the odd terms is 196 and gcd(2408,196) = 28. Or A277068(808) = A006577(808) = 28.
Programs
-
Mathematica
g[n_]:=Module[{a=n,k=0},While[a!=1,k++;If[EvenQ[a],a=a/2,a=a*3+1]];k];Array[g,10^4];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,10^4];Do[If[g[m]==f[m],Print[m]],{m,1,3*10^5}]
Comments