OFFSET
1,1
LINKS
Michel Marcus, Table of n, a(n) for n = 1..8144
FORMULA
a(n) = sqrt((4*A002407(n) - 1)/3). [corrected by Rémi Guillaume, Dec 07 2023]
a(n) = 2*A002504(n) - 1. - Hugo Pfoertner, Oct 07 2023
a(n) = 2*A111251(n) + 1. - Rémi Guillaume, Dec 06 2023
EXAMPLE
(3*5^2 + 1)/4 = 19 is the 2nd prime of this form, so a(2) = 5.
(3*13^2 + 1)/4 = 127 is the 5th prime of this form, so a(5) = 13.
(3*19^2 + 1)/4 = 271 is the 6th prime of this form, so a(6) = 19.
MATHEMATICA
Select[Range[400], PrimeQ[(3#^2+1)/4]&] (* Harvey P. Dale, Mar 24 2011 *)
PROG
(PARI) is(n) = my(p=(3*n^2+1)/4); (denominator(p)==1) && isprime(p); \\ Charles R Greathouse IV, Jun 13 2017; edited by Michel Marcus, Oct 12 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Zak Seidov, Aug 23 2006
STATUS
approved