%I #29 Jul 02 2024 15:01:25
%S 125,343,512,2197,2744,4913,6859,10648,12167,15625,17576,21952,24389,
%T 29791,32768,39304,42875,50653,54872,68921,79507,85184,97336,103823,
%U 117649,125000,140608,148877,166375,175616,195112,205379,226981,238328,262144,274625,300763
%N Cubes which are anagrams of primes.
%C 343 is in the sequence because it is a cube (7^3) and is an anagram of 433, a prime number.
%H Michael S. Branicky, <a href="/A161855/b161855.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1001 from Chai Wah Wu)
%t Select[Range[100]^3, AnyTrue[Permutations[IntegerDigits[#]], PrimeQ[FromDigits[#]] &] &] (* _Paolo Xausa_, Feb 20 2024 *)
%o (Python)
%o from sympy import isprime
%o from itertools import count, islice
%o from sympy.utilities.iterables import multiset_permutations as mp
%o def f(s): return any(p[0]!="0" for p in mp(s) if isprime(int("".join(p))))
%o def agen(): yield from (c for i in count(1) if f(str(c:=i**3)))
%o print(list(islice(agen(), 37))) # _Michael S. Branicky_, Feb 19 2024
%Y Cf. A000578 (cubes).
%K nonn,base
%O 1,1
%A _Claudio Meller_, Jun 20 2009