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.

A072917 a(n) = p(n) - phi(n), where p(n) is the least prime greater than phi(n).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, 1, 3, 1, 1, 1, 3, 3, 1, 1, 1, 1, 3, 1, 1, 3, 1, 5, 1, 1, 1, 5, 1, 1, 1, 1, 3, 5, 1, 1, 1, 1, 3, 5, 5, 1, 1, 1, 5, 1, 1, 1, 1, 1, 1, 1, 5, 5, 3, 1, 5, 3, 5, 1, 5, 1, 1, 1, 1, 1, 5, 1, 5, 5, 1, 1, 5, 3, 1, 3, 1, 1, 5, 1, 3, 1, 1, 1, 5, 1, 1, 1, 1
Offset: 1

Views

Author

Joseph L. Pe, Aug 11 2002

Keywords

Examples

			phi(15) = 8 and the least prime > 8 is 11; hence a(15) = 11 - 8 = 3.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{r, p}, p = EulerPhi[n]; r = p + 1; While[ ! PrimeQ[r], r = r + 1]; r - p]; Table[a[i], {i, 1, 100}]
    lpg[n_]:=Module[{ep=EulerPhi[n]},NextPrime[ep]-ep]; Array[lpg,200] (* Harvey P. Dale, May 29 2017 *)
  • PARI
    A072917(n) = (nextprime(1+eulerphi(n)) - eulerphi(n)); \\ Antti Karttunen, Aug 22 2017

Formula

a(n) = A013632(A000010(n)). - Antti Karttunen, Aug 22 2017

A072341 a(n) = the least natural number k such that k*sigma(n) + 1 is prime.

Original entry on oeis.org

1, 2, 1, 4, 1, 1, 2, 2, 4, 1, 1, 1, 2, 3, 3, 10, 1, 2, 2, 1, 3, 1, 3, 1, 10, 1, 1, 2, 1, 1, 3, 2, 2, 2, 2, 6, 5, 1, 2, 2, 1, 1, 2, 4, 1, 1, 2, 3, 4, 4, 1, 2, 2, 2, 1, 2, 3, 2, 1, 2, 5, 1, 3, 4, 4, 3, 2, 1, 1, 3, 1, 6, 2, 2, 3, 2, 1, 2, 3, 2, 6, 1, 4, 2, 1, 3, 2, 1, 2, 4, 1, 2, 2, 3, 2, 3, 2, 12, 1, 6, 1, 2, 3
Offset: 1

Views

Author

Joseph L. Pe, Jul 16 2002

Keywords

Comments

Conjecture: a(n) is less than or equal to n for all n.

Examples

			sigma(4) = 7 and the least natural number k such that 7 k + 1 is prime is k = 4; so a(4) = 4.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Module[{i}, i = 0; While[ ! PrimeQ[i*DivisorSigma[1, n] + 1], i++ ]; i]; Table[f[i], {i, 1, 150}]
  • PARI
    A072341(n) = { my(k=1,s=sigma(n)); while(!isprime(1+(k*s)),k++); k; }; \\ Antti Karttunen, Nov 07 2017

Formula

a(n) = A034693(A000203(n)). - Antti Karttunen, Nov 07 2017
Showing 1-2 of 2 results.