login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons 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
2, 3, 6, 15, 21, 78, 90, 111, 162, 168, 189, 246, 279, 288, 405, 435, 456, 531, 567, 762, 819, 960, 993, 1002, 1092, 1098, 1149, 1182, 1275, 1365, 1422, 1443, 1449, 1548, 1560, 1659, 1701, 1848, 1932, 1974, 2016, 2163, 2205, 2373, 2430, 2451, 2484, 2541 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Numbers k such that k^4 + k^2 + 1 is a semiprime (A001358). - Thomas Ordowski, Sep 24 2015

LINKS

T. D. Noe, Table of n, a(n) for n = 1..1000

EXAMPLE

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

MATHEMATICA

Select[Range[3000], PrimeQ[# (# - 1) + 1] && PrimeQ[# (# + 1) + 1] &] (* T. D. Noe, Apr 06 2012 *)

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

Select[Range[2600], PrimeOmega[#^4+#^2+1]==2&] (* Harvey P. Dale, Jun 04 2019 *)

PROG

(MAGMA) [n: n in [0..3000] | IsPrime(n^2+n+1) and IsPrime(n^2-n+1)]; // Vincenzo Librandi, Sep 24 2015

(PARI) for(n=1, 1e3, if (isprime(n*(n+1)+1) && if (isprime(n*(n-1)+1), print1(n", ")))) \\ Altug Alkan, Sep 24 2015

CROSSREFS

Cf. A081944.

Sequence in context: A198684 A293534 A066653 * A329745 A255353 A248652

Adjacent sequences:  A081942 A081943 A081944 * A081946 A081947 A081948

KEYWORD

nonn,easy

AUTHOR

Amarnath Murthy, Apr 02 2003

EXTENSIONS

More terms from Don Reble, Apr 08 2003

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 25 04:01 EDT 2021. Contains 345450 sequences. (Running on oeis4.)