A233293 Smallest number that is the largest value in the Collatz (3x + 1) trajectories of exactly n initial values. (a(n)=0 if no such number exists.)
3, 1, 0, 40, 0, 0, 16, 0, 88, 592, 0, 628, 52, 160, 304, 1672, 808, 2248, 3616, 11176, 10096, 8728, 4192, 23056, 13912, 65428, 40804, 5812, 9448, 12148, 8584, 82132, 27700, 10528, 91672, 53188, 58804, 20896, 96064, 2752, 32776, 25972, 14560, 183688, 8080
Offset: 0
Keywords
Examples
a(0) = 3 because no 3x + 1 trajectories have 3 as their largest value, and 3 is the smallest number for which this is the case. a(1) = 1 because exactly one 3x + 1 trajectory (namely, the one whose initial value is 1) has 1 as its largest value (and 1 is the smallest number for which this is the case). a(3) = 40 because exactly three 3x + 1 trajectories (the ones whose initial values are 13, 26, and 40) have 40 as their largest value, and 40 is the smallest number for which this is the case. a(2) = 0 because there exists no number that is the largest value in exactly two 3x + 1 trajectories.
Links
- Jon E. Schoenfield, Table of n, a(n) for n = 0..3000
Programs
-
Mathematica
CollatzSeq[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; nn = 250000; c = Table[Max[CollatzSeq[n]], {n, nn}]; srt = Tally[Sort[c]]; times = Transpose[srt][[2]]; u = Union[times]; d = Differences[u]; mx = Position[d, ?(# > 1 &), 1, 1][[1, 1]] - 1; u2 = Transpose[Take[srt, 10]][[1]]; t0 = Complement[Range[u2[[-1]]], u2][[1]]; t = Table[k = srt[[Position[times, n, 1, 1][[1, 1]]]]; If[k[[1]] > nn, 0, k[[1]]], {n, mx}]; t = Join[{t0}, t] (* _T. D. Noe, Dec 07 2013 *)
Comments