login
Discriminant of quadratic field Q(sqrt(prime(n))) where prime(n) is the n-th prime.
0

%I #9 Jul 26 2015 10:09:40

%S 8,12,5,28,44,13,17,76,92,29,124,37,41,172,188,53,236,61,268,284,73,

%T 316,332,89,97,101,412,428,109,113,508,524,137,556,149,604,157,652,

%U 668,173,716,181,764,193,197,796,844,892,908,229,233,956,241,1004,257,1052

%N Discriminant of quadratic field Q(sqrt(prime(n))) where prime(n) is the n-th prime.

%F a(n) = if prime(n)=4k+1 then prime(n) else prime(n)*4.

%F a(n) = (3*floor((prime(n) mod 4)/2) + 1)*prime(n). - _Reinhard Zumkeller_, Aug 20 2002

%t If[Mod[#,4]==1,#,4#]&/@Prime[Range[60]] (* _Harvey P. Dale_, Jul 26 2015 *)

%o (PARI) a(n)=if(n<0,0,coredisc(prime(n)))

%Y a(n) = A037449(A000040(n)).

%K easy,nonn

%O 1,1

%A _Benoit Cloitre_, Aug 10 2002