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!)
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

Table of n, a(n) for n=1..42.

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

Adjacent sequences:  A125554 A125555 A125556 * A125558 A125559 A125560

KEYWORD

easy,nonn

AUTHOR

Paolo P. Lava and Giorgio Balzarotti, Dec 31 2006

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 March 1 02:21 EST 2021. Contains 341732 sequences. (Running on oeis4.)