A185661 Smallest set containing 1 and closed under the operations x->2x+1, x->3x+1, x->6x+1.
1, 3, 4, 7, 9, 10, 13, 15, 19, 21, 22, 25, 27, 28, 31, 39, 40, 43, 45, 46, 51, 55, 57, 58, 61, 63, 64, 67, 76, 79, 81, 82, 85, 87, 91, 93, 94, 103, 111, 115, 117, 118, 121, 123, 127, 129, 130, 133, 135, 136, 139, 151, 153, 154, 159, 163, 165, 166, 169, 171, 172, 175, 183, 184, 187, 189, 190, 193, 202
Offset: 1
References
- J. C. Lagarias, ed., The Ultimate Challenge: The 3x+1 Problem, Amer. Math. Soc., 2010. See pp. 6, 280.
Links
Crossrefs
Cf. A002977.
Programs
-
Mathematica
terms = 69; Clear[f]; f[n_] := f[n] = With[{lst = NestList[{2 # + 1, 3 # + 1, 6 # + 1}&, 1, n] // Flatten // Union}, If[Length[lst] <= terms, lst, Take[lst, terms]]]; f[1]; f[n = 2]; While[f[n] != f[n-1], Print["n = ", n]; n++]; A185661 = f[n] (* Jean-François Alcover, May 17 2017 *)
-
PARI
list(lim)=my(v=List([1]),i,t); while(i++<=#v, t=2*v[i]+1; if(t>lim, next); listput(v,t); t+=v[i]; if(t>lim, next); listput(v,t); t+=t-1; if(t>lim, next); listput(v,t)); Set(v) \\ Charles R Greathouse IV, Jul 09 2017
-
PARI
list(lim)=my(v=List([1]),m=Map(),t,i); while(i++<=#v, t=2*v[i]+1; if(t>lim, next); if(!mapisdefined(m,t), mapput(m,t,0); listput(v,t)); t+=v[i]; if(t>lim, next); if(!mapisdefined(m,t), mapput(m,t,0); listput(v,t)); t+=t-1; if(t<=lim && !mapisdefined(m,t), mapput(m,t,0); listput(v,t))); m=0; Set(v) \\ Charles R Greathouse IV, Jul 09 2017
Extensions
Name clarified by Charles R Greathouse IV, Jul 09 2017
Comments