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.

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Programs

  • 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
  • Mathematica
    Select[Prime[Range[82000]],Union[IntegerDigits[#]]== Union[ IntegerDigits [#^2]]&] (* Harvey P. Dale, Aug 12 2011 *)
  • PARI
    isA030091(n)=isprime(n)&&Set(Vec(Str(n)))==Set(Vec(Str(n^2))) \\ Charles R Greathouse IV, Jun 28 2011
    

Formula

Equals A000040 INTERSECTION A029793. - Jonathan Vos Post, Jul 06 2008