A154115 Numbers n such that n + 3 is prime.
0, 2, 4, 8, 10, 14, 16, 20, 26, 28, 34, 38, 40, 44, 50, 56, 58, 64, 68, 70, 76, 80, 86, 94, 98, 100, 104, 106, 110, 124, 128, 134, 136, 146, 148, 154, 160, 164, 170, 176, 178, 188, 190, 194, 196, 208, 220, 224, 226, 230, 236, 238, 248, 254, 260, 266, 268, 274, 278
Offset: 1
Examples
a(2) = 2 since (2 + 2)^2 - (2 + 1)^2 - 2 = 5.
Links
- G. C. Greubel, Table of n, a(n) for n = 1..2000
Programs
-
Magma
[n: n in [0..500] | IsPrime((n+2)^2-(n+1)^2-n)]; // Vincenzo Librandi, Nov 26 2010
-
Maple
A154115 := proc(n) ithprime(n+1)-3 ; end proc: # R. J. Mathar, May 09 2010
-
Mathematica
a[n_]:=(n+2)^2-(n+1)^2-n;lst={};Do[If[PrimeQ[a[n]],AppendTo[lst,n]],{n,6!}];lst Select[Range[0,300],PrimeQ[(#+2)^2-(#+1)^2-#]&] (* Harvey P. Dale, Nov 06 2013 *) Prime[Range[2,100]]-3 (* Harvey P. Dale, Jul 15 2017 *)
-
PARI
is(n)=isprime(n+3) \\ Charles R Greathouse IV, Sep 02 2016
Formula
a(n) = A086801(n+1). - R. J. Mathar, May 09 2010
Extensions
New name based on a comment by Franklin T. Adams-Watters, Jan 30 2009