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.

A066080 Largest solution x to phi(x) + 1 = prime(n).

Original entry on oeis.org

2, 6, 12, 18, 22, 42, 60, 54, 46, 58, 62, 126, 150, 98, 94, 106, 118, 198, 134, 142, 270, 158, 166, 276, 420, 250, 206, 214, 378, 348, 254, 262, 274, 278, 298, 302, 474, 486, 334, 346, 358, 594, 382, 840, 394, 398, 422, 446, 454, 458, 708, 478, 1050, 502, 1020
Offset: 1

Views

Author

Labos Elemer, Dec 03 2001

Keywords

Examples

			For p = 97: x = {97, 119, 153, 194, 195, 208, 224, 238, 260, 280, 288, 306, 312, 336, 360, 390, 420} is the set of 17 solutions such that phi(x) + 1 = 97.
		

Crossrefs

Cf. A000010, A057826 (greatest number with totient 2n).

Programs

  • Mathematica
    Table[Do[s=1+EulerPhi[n]; If[Equal[s, Prime[k]], Print[{n, s}]], {n, 1, 4*Prime[k]^2}], {k, 1, 100}]
    Needs["CNT`"]; Table[Solve[EulerPhi[x] == Prime[n] - 1, x][[-1, -1, -1]], {n, 100}] (* T. D. Noe, Nov 07 2011 *)
  • PARI
    a(n) = invphiMax(prime(n)-1); \\ Amiram Eldar, Dec 16 2024, using Max Alekseyev's invphi.gp