cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A030091 Primes such that p and p^2 have same set of digits.

This page as a plain text file.
%I A030091 #19 Nov 21 2013 12:46:28
%S A030091 94583,100469,102953,107251,110923,184903,279863,285101,406951,459521,
%T A030091 493621,499423,504821,684581,752681,758141,758941,786431,836291,
%U A030091 843701,928637,976513,980261,1008947,1009859,1024399,1029647
%N A030091 Primes such that p and p^2 have same set of digits.
%H A030091 Reinhard Zumkeller, <a href="/A030091/b030091.txt">Table of n, a(n) for n = 1..1000</a>
%F A030091 Equals A000040 INTERSECTION A029793. - _Jonathan Vos Post_, Jul 06 2008
%t A030091 Select[Prime[Range[82000]],Union[IntegerDigits[#]]== Union[ IntegerDigits [#^2]]&] (* _Harvey P. Dale_, Aug 12 2011 *)
%o A030091 (PARI) isA030091(n)=isprime(n)&&Set(Vec(Str(n)))==Set(Vec(Str(n^2))) \\ _Charles R Greathouse IV_, Jun 28 2011
%o A030091 (Haskell)
%o A030091 import Data.List (nub, sort)
%o A030091 import Data.Function (on)
%o A030091 a030091 n = a030091_list !! (n-1)
%o A030091 a030091_list =
%o A030091    filter (\x -> ((==) `on` (nub . sort . show)) x (x^2)) a000040_list
%o A030091 -- _Reinhard Zumkeller_, Aug 11 2011
%Y A030091 Cf. A000040, A029793.
%K A030091 nonn,base,nice
%O A030091 1,1
%A A030091 _Patrick De Geest_