login
A154115
Numbers n such that n + 3 is prime.
2
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,2
LINKS
FORMULA
a(n) = A086801(n+1). - R. J. Mathar, May 09 2010
EXAMPLE
a(2) = 2 since (2 + 2)^2 - (2 + 1)^2 - 2 = 5.
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 *)
PROG
(Magma) [n: n in [0..500] | IsPrime((n+2)^2-(n+1)^2-n)] # Vincenzo Librandi, Nov 26 2010
(PARI) is(n)=isprime(n+3) \\ Charles R Greathouse IV, Sep 02 2016
CROSSREFS
Cf. A067076 (a(n-1)/2).
Sequence in context: A219696 A087505 A086801 * A071703 A010069 A360912
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
New name based on a comment by Franklin T. Adams-Watters, Jan 30 2009
STATUS
approved