A088241
Values of y, where x^2 + xy + y^2 = p (xA002476).
2, 3, 3, 5, 4, 6, 5, 7, 8, 7, 8, 9, 7, 7, 10, 9, 12, 11, 11, 9, 13, 14, 11, 12, 15, 10, 12, 13, 17, 16, 11, 13, 17, 13, 17, 15, 12, 15, 20, 13, 18, 17, 21, 21, 18, 17, 21, 14, 21, 19, 24, 23, 19, 22, 15, 18, 20, 21, 19, 25, 18, 19, 23, 21, 27, 17, 27, 25, 19, 20, 27, 23, 28, 21, 26
Offset: 1
Keywords
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
Maple
R:= NULL: count:= 0: for k from 1 while count < 100 do p:= 6*k+1; if not isprime(p) then next fi; S:= select(t -> subs(t,x) > 0 and subs(t,x) < subs(t,y), [isolve(x^2+x*y+y^2=p)]); S:= map(t -> subs(t,y), S); R:= R,op(S); count:= count+1; od: R; #Robert Israel, Jun 16 2025
-
Mathematica
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]; Sow[y /. s[[1]]]]]][[2, 1]] (* Jean-François Alcover, Mar 07 2020 *)
Extensions
More terms from Ray Chandler, Nov 04 2003