A088242
Values of x, where x^2 + xy + y^2 = p (xA002476).
1, 1, 2, 1, 3, 1, 4, 2, 1, 3, 3, 2, 5, 6, 3, 5, 1, 3, 4, 7, 2, 1, 6, 5, 1, 9, 7, 6, 1, 3, 10, 8, 3, 9, 4, 7, 11, 8, 1, 11, 5, 7, 1, 2, 7, 9, 4, 13, 5, 8, 1, 3, 9, 5, 14, 11, 9, 8, 11, 3, 13, 12, 7, 10, 1, 15, 2, 6, 14, 13, 4, 10, 3, 13, 7, 17, 3, 7, 9, 13, 8, 11, 16, 15, 6, 3, 12, 17, 7, 9, 1, 3, 16
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,x), 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[x /. s[[1]]]]]][[2, 1]] (* Jean-François Alcover, Mar 07 2020 *)
Extensions
More terms from Ray Chandler, Nov 04 2003