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-7 of 7 results.

A039698 Numbers k such that phi(k) + 1 is prime.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 17, 18, 19, 21, 22, 23, 26, 27, 28, 29, 31, 32, 34, 36, 37, 38, 40, 41, 42, 43, 46, 47, 48, 49, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63, 67, 71, 73, 74, 75, 76, 77, 79, 82, 83, 86, 88, 89, 91, 93, 94, 95, 97, 98, 99, 100, 101, 103
Offset: 1

Views

Author

Keywords

Comments

Positive integers k for which values of A039649(k) are primes. - Vladimir Shevelev, May 10 2008
For every prime p, the numbers p and 2p are terms of this sequence. - Vladimir Shevelev, May 10 2008
Union of A000040 and A066071. - Ray Chandler, May 26 2008

Examples

			phi(10)+1 = 4+1 = 5, a prime number, so 10 is a term.
		

Crossrefs

Cf. A039689 (complement), A296079 (characteristic function).

Programs

  • Magma
    [n: n in [1..200] | IsPrime(EulerPhi(n)+1)]; // Vincenzo Librandi, Aug 13 2013
  • Mathematica
    Select[Range[300], PrimeQ[EulerPhi[#] + 1]&] (* Vincenzo Librandi, Aug 13 2013 *)

Extensions

Edited by N. J. A. Sloane, May 21 2008 at the suggestion of R. J. Mathar

A072281 Numbers n such that phi(n) + 1 and phi(n) - 1 are twin primes.

Original entry on oeis.org

5, 7, 8, 9, 10, 12, 13, 14, 18, 19, 21, 26, 27, 28, 31, 36, 38, 42, 43, 49, 54, 61, 62, 73, 77, 86, 91, 93, 95, 98, 99, 103, 109, 111, 117, 122, 124, 133, 135, 139, 146, 148, 151, 152, 154, 171, 181, 182, 186, 189, 190, 193, 198, 199, 206, 209, 216, 217, 218, 221, 222
Offset: 1

Views

Author

Joseph L. Pe, Jul 10 2002

Keywords

Comments

Phi(n) is middle term between twin primes (A014574). Union of A006512 and A068019; intersection of A039698 and A078892. - Ray Chandler, May 26 2008
The positions of isolated nonprimes in A000010. - Juri-Stepan Gerasimov, Nov 10 2009

Examples

			phi(14) + 1 = 7 and phi(14) - 1 = 5, so 14 is a term of the sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[10^3], PrimeQ[EulerPhi[ # ] + 1] && PrimeQ[EulerPhi[ # ] - 1] &]
    Select[Range[300],And@@PrimeQ[EulerPhi[#]+{1,-1}]&] (* Harvey P. Dale, Apr 07 2012 *)
  • PARI
    isok(n) = my(p); isprime(p=eulerphi(n)-1) && isprime(p+2); \\ Michel Marcus, Sep 29 2019

Extensions

Extended by Ray Chandler, May 26 2008

A078893 Composite numbers k such that phi(k) - 1 is prime, where phi is Euler's totient function (A000010).

Original entry on oeis.org

8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 26, 27, 28, 30, 33, 35, 36, 38, 39, 42, 44, 45, 49, 50, 51, 52, 54, 56, 62, 64, 65, 66, 68, 69, 70, 72, 77, 78, 80, 81, 84, 86, 90, 91, 92, 93, 95, 96, 98, 99, 102, 104, 105, 111, 112, 117, 120, 121, 122, 123, 124, 129, 130, 133
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 12 2002

Keywords

Comments

A078892 with the primes removed. - Ray Chandler, May 26 2008

Crossrefs

Programs

  • Mathematica
    Select[Range[150],CompositeQ[#]&&PrimeQ[EulerPhi[#]-1]&] (* Harvey P. Dale, Dec 28 2021 *)
  • PARI
    is(n)=!isprime(n) && isprime(eulerphi(n)-1) \\ Charles R Greathouse IV, Feb 21 2013

A214287 Primes of the form phi(n)-1 sorted by increasing n, where phi is the Euler totient function.

Original entry on oeis.org

3, 5, 3, 5, 3, 3, 11, 5, 7, 7, 5, 17, 7, 11, 7, 19, 11, 17, 11, 7, 29, 19, 23, 11, 17, 23, 11, 41, 19, 23, 41, 19, 31, 23, 17, 23, 59, 29, 31, 47, 19, 31, 43, 23, 23, 71, 59, 23, 31, 53, 23, 41, 23, 71, 43, 59, 71, 31, 41, 59, 31, 101, 47, 47, 107, 71, 47, 71, 31, 109, 59, 79, 59, 83
Offset: 1

Views

Author

Vincenzo Librandi, Jul 13 2012

Keywords

Comments

Primes in A109606.

Crossrefs

Cf. A000010, A078892 (associated n), A214288.

Programs

  • Mathematica
    Select[Table[EulerPhi[n]-1,{n,1,1000}],PrimeQ]

A237184 Number of ordered ways to write n = (1+(n mod 2))*p + q with p, q, phi(p+1) - 1 and phi(q-1) + 1 all prime.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 2, 0, 2, 1, 3, 1, 3, 1, 3, 0, 4, 2, 4, 2, 2, 2, 5, 1, 3, 3, 3, 1, 5, 3, 1, 2, 4, 3, 5, 2, 3, 4, 4, 1, 7, 3, 4, 4, 4, 2, 6, 2, 5, 4, 4, 2, 7, 3, 2, 4, 5, 3, 8, 2, 2, 4, 5, 2, 7, 2, 5, 4, 4, 3, 6, 2, 5
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 04 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 23.
This is stronger than Goldbach's conjecture and Lemoine's conjecture (cf. A046927).
We have verified the conjecture for n up to 3*10^6.

Examples

			a(10) = 1 since 10 = 7 + 3 with 7, 3, phi(7+1) - 1 = 3 and phi(3-1) + 1 = 2 all prime.
a(499) = 1 since 499 = 2*199 + 101 with 199, 101, phi(199+1) - 1 = 79 and phi(101-1) + 1 = 41 all prime.
a(869) = 1 since 869 = 2*433 + 3 with 433, 3, phi(433+1) - 1 = 179 and phi(3-1) + 1 = 2 all prime.
		

Crossrefs

Programs

  • Mathematica
    pq[n_]:=PrimeQ[n]&&PrimeQ[EulerPhi[n+1]-1]
    PQ[n_]:=PrimeQ[n]&&PrimeQ[EulerPhi[n-1]+1]
    a[n_]:=Sum[If[pq[k]&&PQ[n-(1+Mod[n,2])k],1,0],{k,1,(n-1)/(1+Mod[n,2])}]
    Table[a[n],{n,1,80}]

A249505 Primes p such that p+1 is a totient (i.e., in A000010).

Original entry on oeis.org

3, 5, 7, 11, 17, 19, 23, 29, 31, 41, 43, 47, 53, 59, 71, 79, 83, 101, 103, 107, 109, 127, 131, 137, 139, 149, 163, 167, 179, 191, 197, 199, 211, 223, 227, 239, 251, 263, 269, 271, 281, 293, 311, 331, 347, 359, 367, 379, 383, 419, 431, 439, 443, 461, 463, 467, 479, 491, 499, 503
Offset: 1

Views

Author

Joerg Arndt, Oct 30 2014

Keywords

Comments

Primes of the form phi(m) - 1 for some m. A001359 is a subsequence. - Thomas Ordowski, Aug 10 2017

Crossrefs

Programs

  • PARI
    select(p->istotient(p+1), primes(200))

A271568 Squarefree semiprimes n such that phi(n) - 1 is prime.

Original entry on oeis.org

10, 14, 15, 21, 26, 33, 35, 38, 39, 51, 62, 65, 69, 77, 86, 91, 93, 95, 111, 122, 123, 129, 133, 146, 159, 161, 201, 203, 206, 209, 213, 215, 217, 218, 221, 249, 278, 287, 291, 299, 301, 302, 303, 305, 321, 335, 339, 362, 371, 381, 386, 395, 398, 403
Offset: 1

Views

Author

Keywords

Comments

Equals (A001358 intersection A078892) - A001248.
Appears to be equal to A088710 without the 9. - R. J. Mathar, Jun 21 2025

Examples

			15 is in the sequence, because 15 = 3*5 is a semiprime with omega(15) = 2 and phi(15) - 1 = 2*4 - 1 = 7 is a prime.
21 is in the sequence, because 21 = 3*7 is a semiprime with omega(21) = 2 and phi(21) - 1 = 2*6 - 1 = 11 is a prime.
		

Crossrefs

Programs

  • Magma
    [n: n in [1..500] |(EulerPhi(n)+DivisorSigma(1,n)) eq 2*(n+1) and IsPrime(EulerPhi(n)-1)]; // Vincenzo Librandi, Jul 29 2016
  • Maple
    with(numtheory):
    is_A271568 := n -> issqrfree(n) and bigomega(n) = 2 and isprime(phi(n)-1):
    select(is_A271568, [$1..403]); # Peter Luschny, Jul 21 2016
  • Mathematica
    A271568Q = SquareFreeQ[#] && PrimeNu[#] == 2 && PrimeQ[EulerPhi[#] - 1] &; Select[Range[500], A271568Q] (* JungHwan Min, Jul 29 2016 *)
  • PARI
    is_a001358(n) = bigomega(n)==2
    is_a005117(n) = issquarefree(n)
    is_a078892(n) = ispseudoprime(eulerphi(n)-1)
    is(n) = is_a001358(n) && is_a005117(n) && is_a078892(n) \\ Felix Fröhlich, Jul 21 2016
    
  • PARI
    is(n)=my(f=factor(n)); f[,2]==[1,1]~ && isprime((f[1,1]-1)*(f[2,1]-1)-1) \\ Charles R Greathouse IV, Jul 21 2016
    
  • PARI
    list(lim)=my(v=List()); forprime(p=2, sqrt(lim), forprime(q=p+1, lim\p, if(isprime((p-1)*(q-1)-1), listput(v, p*q)))); Set(v) \\ Charles R Greathouse IV, Aug 29 2016
    

Extensions

New name from Charles R Greathouse IV, Jul 29 2016
Showing 1-7 of 7 results.