login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Values of x + 2y, where x^2 + xy + y^2=p (x<y) is a prime of the form 6n + 1 (=A002476).
6

%I #9 Mar 09 2020 09:14:10

%S 5,7,8,11,11,13,14,16,17,17,19,20,19,20,23,23,25,25,26,25,28,29,28,29,

%T 31,29,31,32,35,35,32,34,37,35,38,37,35,38,41,37,41,41,43,44,43,43,46,

%U 41,47,46,49,49,47,49,44,47,49,50,49,53,49,50,53,52,55,49,56,56,52,53

%N Values of x + 2y, where x^2 + xy + y^2=p (x<y) is a prime of the form 6n + 1 (=A002476).

%t Reap[For[n = 1, n <= 200, n++, If[PrimeQ[p = 6 n + 1], s = Solve[x^2 + x y + y^2 == p && 0 < x < y, {x, y}, Integers];

%t Sow[x + 2y /. s[[1]]]]]][[2, 1]] (* _Jean-François Alcover_, Mar 09 2020 *)

%Y Cf. A002476, A088241, A088242, A088243, A088296, A088298, A088977.

%K nonn

%O 1,1

%A _Lekraj Beedassy_, Nov 03 2003

%E More terms from _Ray Chandler_, Nov 04 2003