A064622 Values of n at which the ratio A005132(n)/n sets a new record.
1, 2, 3, 6, 7, 19, 34, 67, 102, 115, 190, 2066, 24381, 24398, 24399, 36130540, 409493529, 3744514071, 17951662018, 71184216405
Offset: 1
Examples
A005132(7)=20, 20/7 = 2.857..., larger than the ratio for any smaller value of n. So 7 is in the sequence.
Programs
-
Mathematica
Block[{s = Nest[Append[#1, If[And[#3 > 0, FreeQ[#1, #3]], #3, #1[[-1]] + #2]] & @@ {#1, #2, #1[[-1]] - #2} & @@ {#, Length@ #} &, {0}, 10^5], t}, t = MapIndexed[#1/First@ #2 &, s]; -1 + Rest@ Map[FirstPosition[t, #][[1]] &, Union@ FoldList[Max, t]] ] (* Michael De Vlieger, Dec 29 2019 *)
Extensions
Two more terms from John W. Layman and N. J. A. Sloane, Oct 12 2001
Offset changed, a(19)-a(20) from Jud McCranie, Dec 28 2019
Comments