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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A062088 Primes with every digit a prime and the sum of the digits a prime. 9
2, 3, 5, 7, 23, 223, 227, 337, 353, 373, 557, 577, 733, 757, 773, 2333, 2357, 2377, 2557, 2753, 2777, 3253, 3257, 3323, 3527, 3727, 5233, 5237, 5273, 5323, 5527, 7237, 7253, 7523, 7723, 7727, 22573, 23327, 25237, 25253, 25523, 27253, 27527, 32233 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Alois P. Heinz, Table of n, a(n) for n = 1..10000 (first 718 terms from Marius A. Burtea)

EXAMPLE

2357 is a prime, each digit is a prime and the sum of digits = 17 is also a prime, so 2357 is a term.

MATHEMATICA

aQ[p_] := PrimeQ[p] && Module[{d = IntegerDigits[p]}, PrimeQ[Total[d]] && LengthWhile[d, PrimeQ[#] &] == Length[d]]; Select[Range[33000], aQ] (* Amiram Eldar, Dec 08 2018 *)

PROG

(PARI) isok(p) = isprime(p) && isprime(sumdigits(p)) && (#select(x->(! isprime(x)), digits(p)) == 0); \\ Michel Marcus, Dec 08 2018

(MATLAB)

prim=primes(1000000);

m=1;

for u=1:100;

    v=prim(u);

    nc=dec2base(v, 10)-'0';

    s=sum(nc);

         if and(isprime(nc)==1, isprime(s)==1)

             sol(m)=v;

             m=m+1;

         end

end

sol; % Marius A. Burtea, Dec 08 2018

CROSSREFS

Intersection of A019546 and A046704.

Sequence in context: A052017 A277575 A289754 * A070029 A262339 A110094

Adjacent sequences:  A062085 A062086 A062087 * A062089 A062090 A062091

KEYWORD

nonn,base,easy

AUTHOR

Amarnath Murthy, Jun 16 2001

EXTENSIONS

Corrected and extended by Larry Reeves (larryr(AT)acm.org), Jun 21 2001

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 July 18 15:26 EDT 2019. Contains 325143 sequences. (Running on oeis4.)