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.

Showing 1-2 of 2 results.

A070163 Primes arising in A070162.

Original entry on oeis.org

3, 3, 2, 5, 7, 7, 7, 11, 11, 11, 13, 17, 23, 19, 23, 29, 23, 23, 31, 29, 31, 29, 43, 31, 31, 47, 37, 53, 47, 41, 59, 43, 47, 47, 47, 59, 53, 71, 59, 59, 61, 89, 67, 71, 71, 73, 109, 79, 107, 79, 107, 83, 83, 89, 131, 109, 127, 97, 137, 101, 139, 103, 107, 107, 109, 139
Offset: 1

Views

Author

Labos Elemer, Apr 26 2002

Keywords

Crossrefs

Programs

  • Mathematica
    Do[s=n-EulerPhi[n]-1; If[PrimeQ[s], Print[s]], n, 1, 10000]
  • PARI
    lista(kmax) = {my(p); for(k = 1, kmax, p = k - eulerphi(k) - 1; if(isprime(p), print1(p, ", ")));} \\ Amiram Eldar, Nov 07 2024

Formula

a(n) = A070162(n) - A000010(A070162(n)) - 1 = A051953(A070162(n)) - 1.

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}.
Showing 1-2 of 2 results.