cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A351646 a(n) = A097465(n) - n.

Original entry on oeis.org

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

Views

Author

Michael De Vlieger, May 05 2022

Keywords

Comments

Zeros correspond to fixed points in A097465, which are listed in A352096.

Crossrefs

Programs

  • 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]]