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!)
A125557 Primes in the sequence a(n)=n^2+3/2-1/2*(-1)^n. 0
3, 5, 11, 17, 37, 83, 101, 197, 227, 257, 401, 443, 577, 677, 1091, 1297, 1523, 1601, 2027, 2917, 3137, 3251, 4357, 5477, 6563, 7057, 8101, 8837, 9803, 11027, 12101, 12323, 13457, 13691, 14401, 15131, 15377, 15877, 16901, 17957, 21317, 21611 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
3/2 - (-1)^n/2 adds 1 for any even number and 2 for any odd number.
LINKS
EXAMPLE
5 is a member because 2^2+3/2-1/2=5
MAPLE
P:=proc(n) local i, j; for i from 0 by 1 to n do j:=i^2+3/2-1/2*(-1)^i; if isprime(j) then print(j); fi; od; end: P(200);
MATHEMATICA
Select[Table[n^2+3/2-1/(2(-1)^n), {n, 200}], PrimeQ] (* Harvey P. Dale, Dec 21 2011 *)
CROSSREFS
Sequence in context: A060647 A320353 A155989 * A007455 A034729 A115786
KEYWORD
easy,nonn
AUTHOR
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 March 29 06:57 EDT 2024. Contains 371265 sequences. (Running on oeis4.)