|
|
A161861
|
|
Cubes which are anagrams of squares
|
|
1
|
|
|
1, 64, 729, 1000, 2197, 4096, 9261, 15625, 19683, 21952, 46656, 64000, 91125, 110592, 117649, 132651, 157464, 216000, 226981, 262144, 328509, 343000, 373248, 531441, 592704, 614125, 681472, 729000, 884736, 912673, 1000000, 1061208, 1157625
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
2197 is in the list because is a cube (13^3) and 7921 (an anagram of 2197) is a square(89 * 89)
If k is present then so is 1000k.
Cube root of n's: 1, 4, 9, 10, 13, 16, 21, 25, 27, 28, 36, 40, 45, 48, 49, 51, 54, 60, 61, 64, ..., .
Leading zeros in squares are allowed, i.e. an anagram of 1000 is 0001. - Chai Wah Wu, Nov 04 2016
|
|
LINKS
|
|
|
MATHEMATICA
|
fQ[n_] := Union[ IntegerQ@ Sqrt@ FromDigits@ # & /@ Permutations@ IntegerDigits@ n][[-1]] == True; lst = {}; Do[ If[ fQ[n^3], AppendTo[lst, n^3]; Print[n^3]], {n, 1650}] (* Or for larger n's *)
(* first do *) Needs[ "Combinatorica`" ] (* then *) fQ[ n_ ] := Block[ {id = IntegerDigits@n, k = 1, mx = Floor[ Log[ 10, n ] +1 ]! +1}, While[ k < mx && !IntegerQ@ Sqrt@ FromDigits@ UnrankPermutation[ k, id ], k++ ]; If[ k != mx, True, False ] ]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|