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

A071348 Intersection of A068017 and A068019: numbers n such that both sigma(n) and phi(n) are middle terms between (different) twin prime pairs.

Original entry on oeis.org

10, 26, 38, 135, 206, 209, 216, 278, 371, 398, 416, 545, 560, 650, 698, 792, 866, 924, 1062, 1125, 1286, 1364, 1403, 1482, 1512, 1946, 2021, 2151, 2306, 2432, 2516, 2920, 3040, 3239, 3263, 3338, 3363, 3398, 3443, 3537, 3758, 3815, 4028, 4041, 4058, 4131
Offset: 1

Views

Author

Labos Elemer, May 21 2002

Keywords

Comments

5 is not a term. Sigma[5]=6, and both 6-1=5 and 6+1=7 are primes. Phi[5]=4, and both 4-1=3 and 4+1=5 are primes. But, even though (3,5) and (5,7) are in some sense "(different) twin prime pairs" (quoting the sequence's definition), because 5 is a member of both they are treated, for purposes of this sequence, as not being "different." - Harvey P. Dale, Jun 05 2019

Examples

			n=4440,6328,6808,7030: sigma[n]=13680 between 13679 and 13681 prime, while Phi[4440]=1152,Phi[6328]=2688,Phi[6808]=3168,Phi[7030]=2592 are middle terms between different twin-pairs; n=545,866,1482,1512: phi[n]=432 between 431 and 433; sigma[n]-s give middle terms between different twin prime pairs.
		

Crossrefs

Programs

  • Mathematica
    Do[s=-1+DivisorSigma[1, n]; s1=1+DivisorSigma[1, n]; z=-1+EulerPhi[n]; z1=1+EulerPhi[n]; If[PrimeQ[s]&&PrimeQ[s1]&& PrimeQ[z]&&PrimeQ[z1]&&!PrimeQ[n], Print[{n, s, s1, z, z1}]], {n, 1, 10000}]
    spmtQ[n_]:=Module[{s=DivisorSigma[1,n],p=EulerPhi[n]},s!=p&&AllTrue[ {s+1, s-1,p+1,p-1},PrimeQ]]; Select[Range[6,4200],spmtQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jun 05 2019 *)

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