|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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
|
|
|
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)))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|