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.

A070164 Least number m such that cototient(m) - 1 = prime(n).

Original entry on oeis.org

9, 6, 10, 12, 18, 26, 34, 38, 36, 42, 48, 74, 82, 60, 72, 78, 84, 122, 134, 108, 146, 152, 164, 126, 194, 202, 206, 156, 150, 226, 192, 180, 198, 204, 222, 296, 266, 260, 328, 258, 252, 338, 288, 386, 270, 398, 340, 392, 452, 350, 342, 336, 482, 372, 514, 360
Offset: 1

Views

Author

Labos Elemer, Apr 26 2002

Keywords

Examples

			prime(17) = 59, cototient(k) - 1 = 59 for k = 84, 100, 116 and 118, and the smallest is a(17) = 84.
		

Crossrefs

Programs

  • Mathematica
    seq[lim_] := Module[{c = Table[n - EulerPhi[n] - 1, {n, 1, lim}], m}, m = PrimePi[Max[c]]; TakeWhile[Flatten[FirstPosition[c,#]& /@ Prime[Range[m]]], !MissingQ[#] &]]; seq[600] (* Amiram Eldar, Mar 17 2025 *)
  • PARI
    list(len) = {my(v = vector(len), k = 2, c = 0, p, i); while(c < len, p = k - eulerphi(k) - 1; if(isprime(p), i = primepi(p); if(i <= len && v[i] == 0, v[i] = k; c++)); k++); v;} \\ Amiram Eldar, Mar 17 2025

Formula

a(n) = Min{x: A051953(x) - 1 = n-th prime}.