A266918 Perfect power Löschian numbers.
1, 4, 9, 16, 25, 27, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, 243, 256, 289, 324, 343, 361, 400, 441, 484, 529, 576, 625, 676, 729, 784, 841, 900, 961, 1024, 1089, 1156, 1225, 1296, 1369, 1444, 1521, 1600, 1681, 1728, 1764, 1849, 1936, 2025, 2116, 2187, 2197, 2209, 2304, 2401, 2500
Offset: 1
Keywords
Examples
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.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
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 *)
-
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, ", ")));
Comments