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!)
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 (list; graph; refs; listen; history; text; internal format)
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

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 08:13 EDT 2024. Contains 371922 sequences. (Running on oeis4.)