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.

A068081 Numbers n such that n + phi(n) and n - phi(n) are prime.

Original entry on oeis.org

15, 33, 35, 51, 65, 77, 91, 95, 143, 161, 177, 209, 213, 215, 217, 247, 255, 303, 335, 341, 371, 411, 427, 435, 447, 455, 533, 545, 561, 573, 591, 611, 665, 707, 713, 717, 779, 803, 871, 917, 933, 965, 1001, 1041, 1067, 1105, 1115, 1133, 1157, 1159, 1211
Offset: 1

Views

Author

Amarnath Murthy, Feb 17 2002

Keywords

Crossrefs

Programs

  • GAP
    A068081:=[];; for n in [1,3..10^4+1] do if IsPrime(n+Phi(n)) and IsPrime(n-Phi(n)) then Add(A068081,n); fi; od; A068081;  # Muniru A Asiru, Aug 31 2017
  • Maple
    with(numtheory): for n from 1 by 2 to 10^4 do if [isprime(n+phi(n)),
    isprime(n-phi(n))]=[true,true] then print(n); fi; od; # Muniru A Asiru, Aug 31 2017
  • Mathematica
    Select[ Range[1500], PrimeQ[ # + EulerPhi[ # ]] && PrimeQ[ # - EulerPhi[ # ]] & ]
    epQ[n_]:=Module[{ep=EulerPhi[n]},AllTrue[n+{ep,-ep},PrimeQ]]; Select[ Range[ 1500],epQ] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 22 2016 *)
  • PARI
    is(n)=my(t=eulerphi(n)); isprime(n-t) && isprime(n+t) \\ Charles R Greathouse IV, Jan 25 2017
    

Extensions

Edited and extended by Robert G. Wilson v, Feb 18 2002