login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A030079 Primes p such that digits of p appear in p^2. 2
5, 11, 101, 139, 199, 211, 277, 421, 463, 499, 503, 509, 523, 593, 601, 631, 661, 733, 757, 887, 911, 991, 1021, 1091, 1117, 1163, 1171, 1193, 1201, 1277, 1319, 1451, 1523, 1601, 1621, 1627, 1777, 1783, 1999, 2011, 2027, 2111, 2161, 2203 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 1..10000

MATHEMATICA

ok[p_] := (idp = Union[ IntegerDigits[p]]; Intersection[idp, Union[ IntegerDigits[p^2]]] == idp); Select[ Prime[Range[400]], ok] (* Jean-Fran├žois Alcover, Nov 30 2011 *)

Select[Prime[Range[400]], SubsetQ[IntegerDigits[#^2], IntegerDigits[#]]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Dec 23 2017 *)

PROG

(Haskell)

import Data.List (intersect, nub)

a030079 n = a030079_list !! (n-1)

a030079_list = filter f a000040_list where

   f p = pd == pd `intersect` (nub $ show (p^2)) where

       pd = nub $ show p

-- Reinhard Zumkeller, Nov 03 2011

CROSSREFS

Sequence in context: A224270 A123025 A053778 * A066596 A199325 A199305

Adjacent sequences:  A030076 A030077 A030078 * A030080 A030081 A030082

KEYWORD

nonn,base,nice

AUTHOR

Patrick De Geest

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 20 14:06 EDT 2019. Contains 326152 sequences. (Running on oeis4.)