%I #16 Sep 17 2016 11:53:00
%S 2,3,5,12,11,20,17,26,23,29,42,48,41,56,47,53,59,48,62,71,63,75,83,89,
%T 102,101,110,107,111,113,146,131,137,132,149,170,182,171,167,173
%N Number of solutions to y^2 == x^3 + 17 (mod p) as p runs through the primes.
%C If prime(n) == 0 or 2 (mod 3) then a(n) = prime(n), i.e., the p-defect d(n) = prime(n) - a(n) = A271228(n) vanishes for these n. See A271228, and the Silverman reference, Theorem 45,2., p. 400. (The 0 (mod 3) case, i.e., prime(2) = 3, is trivial.)
%C If prime(n) == 1 (mod 3) = A002476(m) (for a unique m = m(n)) then prime(n) = A(m)^2 + 3*B(m)^2 with A(m) = A001479(m+1) and B(m) = A001480(m+1), m >= 1. In this case (4*prime(n) - d(n)^2)/3, with the p-defect d(n), seems to be a square, q(m)^2, if prime(n) = A002476(m). Three disjoint and exhaustive cases for these squares seem to apply: q(m)^2 = (2*B(m))^2, (A(m) - B(m))^2 and (A(m) + B(m))^2. See exercise 45.3, p. 404, of the Silverman reference, asking for a special form of 4*prime(n) - d(n)^2. These three cases (call them I, II and III) apply to the primes 73, 79, 109, 163, 199, 223, 229, 241, 307, 337, 349, 373, 397, ...; 7, 13, 19, 31, 37, 43, 61, 127, 157, 283, 313, 367, 409, ...; and 67, 97, 103, 139, 151, 181, 193, 211, 271, 277, 331, 379, 421, 433, ..., respectively. The shown numbers cover the first 40 primes 1 (mod 3).
%C The discriminant of the elliptic curve y^2 = x^3 + 17 is -3^3*17^2 = -7803. The bad primes (besides 2) are 3 and 17. See the Silverman reference p. 408.
%D J. H. Silverman, A Friendly Introduction to Number Theory, 3rd ed., Pearson Education, Inc, 2006, Table 45.5, Theorem 45.2, p. 400, Exercise 45.3, p. 404, p. 408 (4th ed., Pearson 2014, Table 5, Theorem 2, p. 366, Exercise 3, p. 370, p. 376)
%H Seiichi Manyama, <a href="/A271227/b271227.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) gives the number of solutions of the congruence y^2 == x^3 + 17 (mod prime(n)), n >= 1.
%F Proved [Silverman]: a(n) = prime(n) if prime(n) = 0 or 2 (mod 3).
%F Conjecture [WL]:
%F If prime(n) = 1 (mod 3), i.e., prime(n) = A002476(m), then a(n) = prime(n) + or -sqrt(4*prime(n) - 3*q(m)^2), with q(m)^2 of the form (2*B(m))^2 or (A(m) - B(m))^2 or (A(m) + B(m))^2 (exclusive or), with A(m) = A001479(m+1) and B(m) = A001480(m+1). See a comment above for the three cases applying to the first 40 primes 1 (mod 3). The +sqrt or -sqrt applies for negative or positive d(n) = A271228(n), respectively.
%F a(n) = prime(n) - A271228(n).
%e Here P(n) stands for prime(n).
%e n, P(n), a(n)\ Solutions (x, y) modulo P(n)
%e 1, 2, 2: (0, 1), (1, 0)
%e 2, 3: 3: (1, 0), (2, 1), (2, 2)
%e 3, 5, 5: (2, 0), (3, 2), (3, 3), (4, 1), (4, 4)
%e 4, 7, 12: (1, 2), (1, 5), (2, 2), (2, 5), (3, 3),
%e (3, 4), (4, 2), (4, 5), (5, 3), (5,4),
%e (6, 3), (6, 4)
%e 5, 11, 11: (2, 5), (2, 6), (3, 0), (4, 2), (4, 9),
%e (8, 1), (8, 10), (9, 3), (9, 8), (10, 4),
%e (10, 7)
%e ...
%e ----------------------------------------------------------
%e The conjecture is for example true for n=4: prime(4) = 7 == 1 (mod 3) = A002476(1). A(1) = 2 , B(1) = 1, q(1)^2 = 1 = (A(1) - B(1))^2 (case 2). a(4) = 7 + sqrt(4*7 - 3*1^2 ) = 7 + 5 = 12 (+sqrt is used here, because d(4) = A271228(4) = -5 (negative)).
%Y Cf. A002476, A001479, A001480, A271228.
%K nonn,easy
%O 1,1
%A _Wolfdieter Lang_, Apr 21 2016