OFFSET
1,2
COMMENTS
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
25 is a term because 25 = 5^2 = 5^2 + 5*0 + 0^2.
27 is a term because 27 = 3^3 = 3^2 + 3*3 + 3^2.
243 is a term because 243 = 3^5 = 9^2 + 9*9 + 9^2.
343 is a term because 343 = 7^3 = 18^2 + 18*1 + 1^2.
MATHEMATICA
fQ[n_] := n == 1 || GCD @@ FactorInteger[n][[All, 2]] > 1; gQ[n_] := Resolve[Exists[{x, y}, Reduce[n == x^2 + x y + y^2, {x, y}, Integers]]]; Select[Range@ 2500, fQ@# && gQ@# &] (* Michael De Vlieger, Jan 06 2016, after Ant King at A001597 and Jean-François Alcover at A003136 *)
PROG
(PARI) x='x+O('x^10^4); p=eta(x)^3/eta(x^3); for(n=0, 9999, if(polcoeff(p, n) != 0 && (ispower(n) || n==1), print1(n, ", ")));
(PARI) is(n) = (ispower(n) || n==1) && #bnfisintnorm(bnfinit(z^2+z+1), n);
for(n=0, 1e4, if(is(n), print1(n, ", ")));
CROSSREFS
KEYWORD
nonn
AUTHOR
Altug Alkan, Jan 06 2016
STATUS
approved