login
A161855
Cubes which are anagrams of primes.
1
125, 343, 512, 2197, 2744, 4913, 6859, 10648, 12167, 15625, 17576, 21952, 24389, 29791, 32768, 39304, 42875, 50653, 54872, 68921, 79507, 85184, 97336, 103823, 117649, 125000, 140608, 148877, 166375, 175616, 195112, 205379, 226981, 238328, 262144, 274625, 300763
OFFSET
1,1
COMMENTS
343 is in the sequence because it is a cube (7^3) and is an anagram of 433, a prime number.
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000 (terms 1..1001 from Chai Wah Wu)
MATHEMATICA
Select[Range[100]^3, AnyTrue[Permutations[IntegerDigits[#]], PrimeQ[FromDigits[#]] &] &] (* Paolo Xausa, Feb 20 2024 *)
PROG
(Python)
from sympy import isprime
from itertools import count, islice
from sympy.utilities.iterables import multiset_permutations as mp
def f(s): return any(p[0]!="0" for p in mp(s) if isprime(int("".join(p))))
def agen(): yield from (c for i in count(1) if f(str(c:=i**3)))
print(list(islice(agen(), 37))) # Michael S. Branicky, Feb 19 2024
CROSSREFS
Cf. A000578 (cubes).
Sequence in context: A256362 A175486 A250579 * A353502 A252057 A045184
KEYWORD
nonn,base
AUTHOR
Claudio Meller, Jun 20 2009
STATUS
approved