OFFSET
1,1
COMMENTS
(A000217(a(n))+1)/2 is prime.
LINKS
Daniel Starodubtsev, Table of n, a(n) for n = 1..10000
EXAMPLE
For k=2, (k^2 + k + 2)/4 = 2 is prime. Then 2 is in the sequence.
For k=6, (k^2 + k + 2)/4 = 11 is prime. Then 6 is in the sequence.
For k=5, (k^2 + k + 2)/4 = 8 is not prime. Then 5 is not in the sequence.
MAPLE
tn := unapply(n*(n+1)/2, n):
f := unapply((t+1)/2, t):
T := []: N := []: P := []:
for k from 0 to 5000 do
t:=tn(k):
p := f(k):
if p = floor(p) then
p = floor(p):
if isprime(p) then
T := [op(T), t]:
N := [op(N), k]:
P := [op(P), p]:
end if:
end if:
if nops(T) = 50 then
break:
end if:
end do:
N := N;
MATHEMATICA
Select[Range[500], PrimeQ[(#^2 + # + 2)/4] &] (* T. D. Noe, Sep 24 2012 *)
PROG
(PARI) is(n)=isprime((n^2+n+2)/4) \\ Charles R Greathouse IV, Jun 13 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
César Eliud Lozada, Sep 22 2012
STATUS
approved