login
A030091
Primes such that p and p^2 have same set of digits.
2
94583, 100469, 102953, 107251, 110923, 184903, 279863, 285101, 406951, 459521, 493621, 499423, 504821, 684581, 752681, 758141, 758941, 786431, 836291, 843701, 928637, 976513, 980261, 1008947, 1009859, 1024399, 1029647
OFFSET
1,1
LINKS
FORMULA
Equals A000040 INTERSECTION A029793. - Jonathan Vos Post, Jul 06 2008
MATHEMATICA
Select[Prime[Range[82000]], Union[IntegerDigits[#]]== Union[ IntegerDigits [#^2]]&] (* Harvey P. Dale, Aug 12 2011 *)
PROG
(PARI) isA030091(n)=isprime(n)&&Set(Vec(Str(n)))==Set(Vec(Str(n^2))) \\ Charles R Greathouse IV, Jun 28 2011
(Haskell)
import Data.List (nub, sort)
import Data.Function (on)
a030091 n = a030091_list !! (n-1)
a030091_list =
filter (\x -> ((==) `on` (nub . sort . show)) x (x^2)) a000040_list
-- Reinhard Zumkeller, Aug 11 2011
CROSSREFS
Sequence in context: A348021 A248067 A252323 * A128376 A216122 A206411
KEYWORD
nonn,base,nice
STATUS
approved