A387075 First differences of A386482.
1, 2, 2, -3, 6, 3, -2, -2, 6, -7, 14, -3, -2, 4, -5, -10, 20, 5, -2, -2, -2, -2, -11, 22, -6, 9, -2, -2, 6, -19, 38, -3, -2, -2, -2, -2, -2, -2, -2, -5, 10, -6, -26, 52, -5, -2, -2, -7, 14, -12, -34, 51, -2, -2, -2, -31, 62, -3, -2, -2, -2, -2, -2, -2, -2, -2
Offset: 1
Keywords
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..10000
- Michael De Vlieger, Logarithmic scatterplot of log_10 |a(n)|, n = 1..2^20, showing negative values in red and positive in green.
Crossrefs
Cf. A386482.
Programs
-
Mathematica
Block[{c, j, k, m, p, r, nn}, nn = 120; c[] := False; m[] := 1; j = 2; c[1] = c[2] = True; r = 0; {1, 2}~Join~Monitor[Reap[Do[ If[PrimePowerQ[j], Set[{p, k, m}, {#1, #1^(#2 - 1), #1^(#2 - 1)}] & @@ FactorInteger[j][[1]]; While[And[c[k*p], k != 0], k--]; If[k == 0, k = m; While[c[k*p], k++]]; k *= p, k = j - 1; While[And[Or[c[k], CoprimeQ[j, k]], k != 1], k--]; If[k == 1, k += j; While[Or[c[k], CoprimeQ[j, k] ], k++] ] ]; Sow[k - j]; Set[{c[k], j}, {True, k}], {n, 3, nn}] ][[-1, 1]], n] ]