login
A351646
a(n) = A097465(n) - n.
3
0, 1, 2, -2, 2, -2, 2, 3, -3, 3, -3, 3, 4, -4, 4, -4, 6, -4, 6, -4, 0, 4, 6, -6, 6, -6, 0, -6, 6, -6, 6, -4, 0, 4, 6, -6, 6, -6, 0, -6, 4, 5, -7, 5, -5, 5, -3, 5, -7, 5, -5, 5, -3, 5, -7, 5, -5, 5, -1, 5, -7, 5, -7, 5, -3, 5, -7, 5, -5, 5, -3, 5, -1, 5, -9, 7
OFFSET
1,3
COMMENTS
Zeros correspond to fixed points in A097465, which are listed in A352096.
LINKS
Michael De Vlieger, Annotated scatterplot of a(n), n = 1..300000, showing even terms in red, odd in blue, with positions of zeros in italic.
MATHEMATICA
nn = 2^20; c = {1}; j = 1; u = 2; {1}~Join~Reap[Do[k = u; While[Nand[FreeQ[c, k], CoprimeQ[j, k], k != j + 1, k != j - 1], k++]; j = k; AppendTo[c, k]; Sow[k - i]; If[k == u, While[MemberQ[c, u], u++]; c = DeleteCases[c, _?(# < u &)]], {i, 2, nn}]][[-1, -1]]
CROSSREFS
Sequence in context: A060384 A105564 A241766 * A025811 A034258 A184349
KEYWORD
sign,easy
AUTHOR
Michael De Vlieger, May 05 2022
STATUS
approved