A385738 For n >= 1, a(n) is the least k such that the Sum_{i=0..(n-1)} (k+i)/A000005(k+i) is an integer or a(n) = -1 if no such k exists.
1, 1, 6, 6, 8, 5, 6, 23, 5, 22, 50, 26, 28, 65, 119, 145, 26, 349, 282, 375, 280, 404, 278, 369, 279, 370, 277, 276, 369, 378, 389, 378, 389, 15, 389, 13, 12, 210, 10, 9, 8, 210, 6, 212, 421, 209, 419, 3, 2, 1, 378, 419, 421, 418, 418, 1026, 373, 105, 104
Offset: 1
Keywords
Examples
For n = 4: Sum_{i=0..3} (k+i)/A000005(k+i) is an integer for the least k = 6 because 6/A000005(6) + 7/A000005(7) + 8/A000005(8) + 9/A000005(9) = 10.
Crossrefs
Cf. A000005.
Programs
-
Mathematica
seq[max_] := Module[{v = Table[n/DivisorSigma[0, n], {n, 1, max}], k = 1, s = {}, i}, While[NumberQ[i = FirstPosition[Plus @@@ Partition[v, k, 1], ?IntegerQ][[1]]], AppendTo[s, i]; k++]; s]; seq[1200] (* _Amiram Eldar, Jul 08 2025 *)
-
PARI
a(n) = my(k=1); while(denominator(sum(i=0, n-1, (k+i)/numdiv(k+i))) != 1, k++); k; \\ Michel Marcus, Jul 08 2025