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.

A271981 Primes p such that p + 40 is also prime.

This page as a plain text file.
%I A271981 #27 Jul 21 2022 08:28:02
%S A271981 3,7,13,19,31,43,61,67,73,97,109,127,139,151,157,193,199,211,223,229,
%T A271981 241,271,277,307,313,349,379,409,421,439,463,523,547,577,601,607,613,
%U A271981 619,643,661,733,757,769,787,823,907,937,991,1009,1021,1051,1063,1069
%N A271981 Primes p such that p + 40 is also prime.
%C A271981 A126721 is a subsequence of this sequence.
%H A271981 Karl V. Keller, Jr., <a href="/A271981/b271981.txt">Table of n, a(n) for n = 1..10000</a>
%e A271981 3 is a term since 3 + 40 = 43 is also prime.
%e A271981 7 is a term since 7 + 40 = 47 is also prime.
%p A271981 q:= n-> andmap(isprime, [n, n+40]):
%p A271981 select(q, [$2..2000])[];  # _Alois P. Heinz_, Jul 21 2022
%t A271981 Select[Prime@ Range@ 180, PrimeQ[# + 40] &] (* _Michael De Vlieger_, Apr 18 2016 *)
%o A271981 (Python)
%o A271981 from sympy import isprime
%o A271981 for i in range(3, 2001,2):
%o A271981      if isprime(i) and isprime(i+40): print (i,end=', ')
%o A271981 (PARI) lista(nn) = forprime(p=2, nn, if (isprime(p+40), print1(p, ", "))); \\ _Michel Marcus_, Apr 19 2016
%Y A271981 Cf. A000040, A126721.
%K A271981 nonn
%O A271981 1,1
%A A271981 _Karl V. Keller, Jr._, Apr 17 2016