|
|
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
|
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|