login
Least positive integer x such that p = (x^2 - 5*y^2)/4 where p is the n-th odd prime such that 5 is a square mod p.
(Formerly M3758 N1534)
1

%I M3758 N1534 #17 Oct 15 2023 01:41:41

%S 5,7,9,11,12,13,16,17,17,19,19,22,21,23,24,26,27,29,27,28,29,32,31,31,

%T 33,32,34,33,37,37,37,39,41,39,41,43,41,41,42,43,44,46,43,44,47,49,46,

%U 47,47,49,48,49,53,51,52,53,56,57,53,53,54,59,56,57,58,59,59,57,58,61

%N Least positive integer x such that p = (x^2 - 5*y^2)/4 where p is the n-th odd prime such that 5 is a square mod p.

%C The n-th odd prime for which 5 is a square mod p is A038872(n).

%D A. J. C. Cunningham, Quadratic Partitions. Hodgson, London, 1904, p. 1.

%D D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, p. 55.

%D N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%H A. J. C. Cunningham, <a href="/A002330/a002330.pdf">Quadratic Partitions</a>, Hodgson, London, 1904. [Annotated scans of selected pages]

%e 5 = (5^2 - 5*1^2)/4 so a(1)=5;

%e 11 = (7^2 - 5*1^2)/4 so a(2)=7.

%o (PARI) a(n)=local(y,p); if(n<1,0,p=0; y=2; until(p>=n,y++; if(issquare(5+O(prime(y))),p++)); p=prime(y); y=0; until(issquare(4*p+5*y^2),y++); sqrtint(4*p+5*y^2))

%Y Cf. A002343, A038872.

%K nonn

%O 1,1

%A _N. J. A. Sloane_