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.

A046117 Primes p such that p-6 is also prime. (Upper of a pair of sexy primes.)

This page as a plain text file.
%I A046117 #50 Apr 02 2025 20:30:05
%S A046117 11,13,17,19,23,29,37,43,47,53,59,67,73,79,89,103,107,109,113,137,157,
%T A046117 163,173,179,197,199,229,233,239,257,263,269,277,283,313,317,337,353,
%U A046117 359,373,379,389,439,449,463,467,509,547,563,569,577,593,599,607,613
%N A046117 Primes p such that p-6 is also prime. (Upper of a pair of sexy primes.)
%H A046117 T. D. Noe, <a href="/A046117/b046117.txt">Table of n, a(n) for n = 1..1000</a>
%H A046117 Ernest G. Hibbs, <a href="https://www.proquest.com/openview/4012f0286b785cd732c78eb0fc6fce80">Component Interactions of the Prime Numbers</a>, Ph. D. Thesis, Capitol Technology Univ. (2022), see p. 33.
%H A046117 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/SexyPrimes.html">Sexy Primes</a>. [The definition in this webpage is unsatisfactory, because it defines a "sexy prime" as a pair of primes.- _N. J. A. Sloane_, Mar 07 2021].
%H A046117 Wikipedia, <a href="https://en.wikipedia.org/wiki/Sexy_prime">Sexy prime</a>.
%F A046117 a(n) = A087695(n) + 3.
%F A046117 a(n) = A023201(n) + 6. - _M. F. Hasler_, Jan 02 2020
%t A046117 q=6; a={}; Do[p1=Prime[n]; p2=p1+q; If[PrimeQ[p2], AppendTo[a, p2]], {n, 7^2}]; a "and/or" Select[Prime[Range[3, 7^2]], PrimeQ[ # ]&&PrimeQ[ #-6]&] (* _Vladimir Joseph Stephan Orlovsky_, Aug 07 2008 *)
%t A046117 Select[Prime[Range[4,200]],PrimeQ[#-6]&] (* _Harvey P. Dale_, Mar 31 2018 *)
%o A046117 (PARI) forprime(p=2,1e4,if(isprime(p-6),print1(p", "))) \\ _Charles R Greathouse IV_, Jul 15 2011
%o A046117 (Magma) [p:p in PrimesInInterval(7,650)| IsPrime(p-6)]; // _Marius A. Burtea_, Jan 03 2020
%Y A046117 Cf. A023201, A098428, A087695.
%K A046117 nonn
%O A046117 1,1
%A A046117 _Eric W. Weisstein_
%E A046117 Name edited by _M. F. Hasler_, Jan 02 2020