login
A217001
Numbers k such that (k^2 + k + 2)/4 is prime.
2
2, 6, 9, 14, 22, 25, 30, 33, 41, 46, 49, 54, 57, 62, 86, 89, 97, 113, 118, 121, 126, 134, 142, 161, 177, 198, 201, 209, 214, 217, 222, 225, 238, 254, 265, 273, 278, 286, 294, 302, 305, 310, 313, 321, 329, 337, 342, 350, 366, 393, 414, 417, 425, 441, 449, 470
OFFSET
1,1
COMMENTS
(A000217(a(n))+1)/2 is prime.
LINKS
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
Cf. A000040.
Sequence in context: A373327 A096378 A342426 * A320666 A079023 A327967
KEYWORD
nonn,easy
AUTHOR
César Eliud Lozada, Sep 22 2012
STATUS
approved