OFFSET
1,2
COMMENTS
An anagram of a k-digit number is one of the k! permutations of the digits that does not begin with 0.
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000 (terms 1..1000 from Harvey P. Dale)
EXAMPLE
126 is in the sequence because 216 = 6^3.
MATHEMATICA
Select[Range[2000], AnyTrue[Surd[FromDigits/@Select[ Permutations[ IntegerDigits[#]], #[[1]]>0&], 3], IntegerQ]&] (* The program uses the AnyTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jul 15 2016 *)
PROG
(Python)
from itertools import count, takewhile
def hash(n): return "".join(sorted(str(n)))
def aupto_digits(d):
cubes = takewhile(lambda x:x<10**d, (i**3 for i in count(1)))
C = set(map(hash, cubes))
return [k for k in range(1, 10**d) if hash(k) in C]
print(aupto_digits(4)) # Michael S. Branicky, Feb 18 2024
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Colin Barker, Jan 19 2014
STATUS
approved