login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A081945 Numbers k such that both k*(k + 1) + 1 and k*(k - 1) + 1 are primes. 2

%I #37 Sep 08 2022 08:45:09

%S 2,3,6,15,21,78,90,111,162,168,189,246,279,288,405,435,456,531,567,

%T 762,819,960,993,1002,1092,1098,1149,1182,1275,1365,1422,1443,1449,

%U 1548,1560,1659,1701,1848,1932,1974,2016,2163,2205,2373,2430,2451,2484,2541

%N Numbers k such that both k*(k + 1) + 1 and k*(k - 1) + 1 are primes.

%C Numbers k such that k^4 + k^2 + 1 is a semiprime (A001358). - _Thomas Ordowski_, Sep 24 2015

%H T. D. Noe, <a href="/A081945/b081945.txt">Table of n, a(n) for n = 1..1000</a>

%e 6 is a term since both 6*7 + 1 = 43 and 6*5 + 1 = 31 are primes.

%t Select[Range[3000], PrimeQ[# (# - 1) + 1] && PrimeQ[# (# + 1) + 1] &] (* _T. D. Noe_, Apr 06 2012 *)

%t Select[Range[2, 3000], Plus@@Last/@FactorInteger[(#^6 - 1) / (#^2 - 1)] == 2 &] (* _Vincenzo Librandi_, Sep 24 2015 *)

%t Select[Range[2600],PrimeOmega[#^4+#^2+1]==2&] (* _Harvey P. Dale_, Jun 04 2019 *)

%o (Magma) [n: n in [0..3000] | IsPrime(n^2+n+1) and IsPrime(n^2-n+1)]; // _Vincenzo Librandi_, Sep 24 2015

%o (PARI) for(n=1, 1e3, if (isprime(n*(n+1)+1) && if (isprime(n*(n-1)+1), print1(n", ")))) \\ _Altug Alkan_, Sep 24 2015

%Y Cf. A081944.

%K nonn,easy

%O 1,1

%A _Amarnath Murthy_, Apr 02 2003

%E More terms from _Don Reble_, Apr 08 2003

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 00:30 EDT 2024. Contains 371917 sequences. (Running on oeis4.)