cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A235994 Numbers having at least one anagram which is a cube.

Original entry on oeis.org

1, 8, 27, 46, 64, 72, 125, 126, 152, 162, 215, 216, 251, 261, 279, 297, 334, 343, 433, 512, 521, 612, 621, 729, 792, 927, 972, 1000, 1133, 1269, 1278, 1279, 1287, 1296, 1297, 1313, 1331, 1349, 1394, 1439, 1493, 1629, 1692, 1728, 1729, 1782, 1792, 1827, 1872
Offset: 1

Views

Author

Colin Barker, Jan 19 2014

Keywords

Comments

An anagram of a k-digit number is one of the k! permutations of the digits that does not begin with 0.

Examples

			126 is in the sequence because 216 = 6^3.
		

Crossrefs

Programs

  • 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 *)
  • 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