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.

This page as a plain text file.
%I A068081 #10 Sep 03 2017 21:54:26
%S A068081 15,33,35,51,65,77,91,95,143,161,177,209,213,215,217,247,255,303,335,
%T A068081 341,371,411,427,435,447,455,533,545,561,573,591,611,665,707,713,717,
%U A068081 779,803,871,917,933,965,1001,1041,1067,1105,1115,1133,1157,1159,1211
%N A068081 Numbers n such that n + phi(n) and n - phi(n) are prime.
%H A068081 Harvey P. Dale, <a href="/A068081/b068081.txt">Table of n, a(n) for n = 1..1000</a>
%p A068081 with(numtheory): for n from 1 by 2 to 10^4 do if [isprime(n+phi(n)),
%p A068081 isprime(n-phi(n))]=[true,true] then print(n); fi; od; # _Muniru A Asiru_, Aug 31 2017
%t A068081 Select[ Range[1500], PrimeQ[ # + EulerPhi[ # ]] && PrimeQ[ # - EulerPhi[ # ]] & ]
%t A068081 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 *)
%o A068081 (PARI) is(n)=my(t=eulerphi(n)); isprime(n-t) && isprime(n+t) \\ _Charles R Greathouse IV_, Jan 25 2017
%o A068081 (GAP)
%o A068081 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
%Y A068081 Cf. A050530, A068080.
%K A068081 easy,nonn
%O A068081 1,1
%A A068081 _Amarnath Murthy_, Feb 17 2002
%E A068081 Edited and extended by _Robert G. Wilson v_, Feb 18 2002