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.

A329727 Numbers k such that k^3 +- 2 and k +- 2 are prime.

This page as a plain text file.
%I A329727 #26 Sep 08 2022 08:46:24
%S A329727 129,1491,1875,2709,5655,6969,10335,14325,14421,17319,26559,35109,
%T A329727 37509,43719,50229,52629,101871,102795,104325,105501,120429,127599,
%U A329727 132699,136395,137829,157521,172425,173685,179481,186189,191829,211371,219681,221199,229215,234195
%N A329727 Numbers k such that k^3 +- 2 and k +- 2 are prime.
%C A329727 All terms in this sequence are divisible by 3.
%H A329727 Daniel Starodubtsev, <a href="/A329727/b329727.txt">Table of n, a(n) for n = 1..10000</a>
%e A329727 a(1) = 129:
%e A329727   129^3 + 2 = 2146691;
%e A329727   129^3 - 2 = 2146687;
%e A329727   129   + 2 =     131;
%e A329727   129   - 2 =     127; all four results are prime.
%e A329727 a(2) = 1491:
%e A329727   1491^3 + 2 = 3314613773;
%e A329727   1491^3 - 2 = 3314613769;
%e A329727   1491   + 2 =       1493;
%e A329727   1491   - 2 =       1489; all four results are prime.
%t A329727 Select[Range[500000], PrimeQ[#^3 + 2] && PrimeQ[#^3 - 2] && PrimeQ[# + 2] && PrimeQ[# - 2] &]
%o A329727 (Magma) [k:k in [1..250000]|forall{m:m in [-2,2]|IsPrime(k+m) and IsPrime(k^3+m)}]; // _Marius A. Burtea_, Nov 20 2019
%o A329727 (PARI) isok(k) = isprime(k-2) && isprime(k+2) && isprime(k^3-2) && isprime(k^3+2); \\ _Michel Marcus_, Nov 24 2019
%o A329727 (PARI) list(lim)=my(v=List(),p=127,k); forprime(q=131,lim+2,if(q-p==4 && isprime((k=p+2)^3-2) && isprime(k^3+2), listput(v,k)); p=q); Vec(v) \\ _Charles R Greathouse IV_, May 06 2020
%Y A329727 Intersection of A038599, A067200, and A087679.
%Y A329727 Cf. A040976, A052147, A090121, A268043, A268186.
%K A329727 nonn
%O A329727 1,1
%A A329727 _K. D. Bajpai_, Nov 19 2019