login
Primes p such that p + 10 is also prime.
33

%I #106 Aug 27 2022 07:40:58

%S 3,7,13,19,31,37,43,61,73,79,97,103,127,139,157,163,181,223,229,241,

%T 271,283,307,337,349,373,379,409,421,433,439,457,499,547,577,607,631,

%U 643,673,691,709,733,751,787,811,829,853,877,919,937,967,1009,1021,1039,1051

%N Primes p such that p + 10 is also prime.

%C A subset of A002476. It appears that this is also a subset of A007645. The first few terms of A007645 that are not in this sequence are {67, 109, 151, 193, 199, 211, 277, 313, 331, 367, 397, 463, 487, 523, 541, 571, 601, 613, ...}. - _Alexander Adamchuk_, Aug 15 2006

%C The entries are all in A007645, because they cannot be of the form p = 3*j + 2. If they were, p + 10 = 3*j + 12 would be divisible by 3 and not prime. - _R. J. Mathar_, Oct 30 2009

%H Matt C. Anderson, <a href="/A023203/b023203.txt">Table of n, a(n) for n = 1..10000</a> (first 1000 terms from Harvey P. Dale)

%H Maxie D. Schmidt, <a href="https://arxiv.org/abs/1701.04741">New Congruences and Finite Difference Equations for Generalized Factorial Functions</a>, arXiv:1701.04741 [math.CO], 2017.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/TwinPrimes.html">Twin Primes</a>

%p for p from 1 to 10000 do if isprime(p) and isprime(p+10) then print(p) end if end do # _Matt C. Anderson_, Aug 26 2022

%t Select[Prime[Range[200]], PrimeQ[# + 10] &] (* _Harvey P. Dale_, Dec 14 2011 *)

%o (Magma) [n: n in [0..1000] | IsPrime(n) and IsPrime(n+10)]; // _Vincenzo Librandi_, Nov 20 2010

%o (PARI) is(n)=isprime(n)&&isprime(n+10) \\ _Charles R Greathouse IV_, Jul 01 2013

%Y Different from A015916. Cf. A031928, A079033.

%Y Cf. A002476, A007645, A092146.

%K nonn,easy

%O 1,1

%A _David W. Wilson_

%E Revised by _N. J. A. Sloane_, Jan 29 2013

%E New name from _Michel Marcus_, Mar 04 2020