A352931 a(n) = A093714(n) - n.
0, 1, -1, 1, -1, 1, -1, 3, -1, 3, -2, 2, 4, -4, 4, -4, 6, -3, 3, 1, -5, 3, -5, 5, -5, 1, -1, 3, -5, 5, 1, 5, -5, -1, 3, 5, -7, 5, -5, -1, 3, 5, -7, 5, -5, 5, -1, -3, 3, 5, -9, 1, -5, 5, -5, 1, -1, 3, -5, 5, -3, 1, -1, 3, -5, 5, -3, 1, -1, 3, -5, 7, -3, 7, -1, 1, -5, 5, -4, 2, 4, -6, 4, -4, 4, -8, 8, -4, 8, -4, 0, -4, 0, -2, 4, -2, 4, -8, 4, -4, 6, -4
Offset: 1
Keywords
Links
- N. J. A. Sloane, Table of n, a(n) for n = 1..10000
- Michael De Vlieger, Scatterplot of a(n), n = 1..2^20, logarithmic along the x-axis, showing even terms in red and odd in blue, accentuating zeros that are confined to even-term intervals, annotating positive and negative records, and labeling the last term a(k) in parity intervals, with k in A351498.
Programs
-
Mathematica
nn = 120; c = {1}; s = 0; a[1] = j = 1; u = 2; Do[k = u; While[Nand[FreeQ[c, k], CoprimeQ[j, k], k != j + 1], k++]; j = k; AppendTo[c, k]; a[i] = k - i; If[k == u, While[MemberQ[c, u], u++]; c = DeleteCases[c, ?(# < u &)]], {i, 2, nn}], Array[a, nn] (* _Michael De Vlieger, May 04 2022 *)
Comments