OFFSET
1,1
COMMENTS
All terms > 3 are congruent to 5 mod 6 (observation by Zak Seidov in SeqFan). Thus each corresponding p + 8 is congruent to 1 mod 6. - Rick L. Shepherd, Mar 25 2023
LINKS
Matt C. Anderson, Table of n, a(n) for n = 1..10000 (terms 1..1000 from T. D. Noe, corrected by Sean A. Irvine and Georg Fischer)
A. Granville and G. Martin, Prime number races, arXiv:math/0408319 [math.NT], 2004.
Maxie D. Schmidt, New Congruences and Finite Difference Equations for Generalized Factorial Functions, arXiv:1701.04741 [math.CO], 2017.
Eric Weisstein's World of Mathematics, Twin Primes
MAPLE
select(n-> isprime(n) and isprime(n+8), [`$`(1..1500)]); # G. C. Greubel, Feb 07 2020
MATHEMATICA
Select[Range[1500], PrimeQ[#] && PrimeQ[#+8]&] (* Vladimir Joseph Stephan Orlovsky, Aug 29 2008 *)
Select[Prime[Range[250]], PrimeQ[#+8]&] (* Harvey P. Dale, Dec 24 2020 *)
PROG
(Magma) [n: n in [0..1500] | IsPrime(n) and IsPrime(n+8)]; // Vincenzo Librandi, Nov 20 2010
(PARI) is(n)=isprime(n)&&isprime(n+8) \\ Charles R Greathouse IV, Jul 01 2013
(Sage) [n for n in (1..1500) if is_prime(n) and is_prime(n+8)] # G. C. Greubel, Feb 07 2020
(GAP) Filtered([1..1500], k-> IsPrime(k) and IsPrime(k+8)) # G. C. Greubel, Feb 07 2020
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved