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.

A386856 Least k such that A056100(k) = 2*n+1 or -1 if no such k exists.

Original entry on oeis.org

6, 4, 8, 9, 16, 26, 15, 34, 20, 27, 25, 115, 56, 58, 62, 57, 35, 74, 90, 82, 86, 49, 94, 329, 60, 106, 517582, 78, 91, 122, 110, 77, 128, 111, 142, 146, 88, 427, 158, 102, 100, 265, 273, 178, 242, 95, 212, 194, 104, 202, 125, 462, 214, 218, 132, 121, 344, 138, 470, 241582
Offset: 0

Views

Author

Michel Marcus, Aug 05 2025

Keywords

Comments

a(n) is the least k such that (sigma(k)*phi(k) + 1) mod k = 2*n+1 or -1 if no such k exists.

Crossrefs

Cf. A056100.

Programs

  • Mathematica
    a[n_]:=Module[{k=1},While[Mod[DivisorSigma[1,k]EulerPhi[k]+1,k]!=2n+1, k++]; k]; Array[a,60,0] (* Stefano Spezia, Aug 05 2025 *)
  • PARI
    f(n) = (sigma(n)*eulerphi(n)+1) % n; \\ A056100
    a(n) = my(k=1); while (f(k) != 2*n+1, k++); k;