login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A245381 Primes p such that sum and product of decimal digits of p are both semiprimes. 1
19, 37, 73, 127, 271, 1153, 1531, 1571, 3511, 5113, 5171, 5711, 7151, 11161, 11251, 12511, 15121, 16111, 25111, 111119, 111191, 111317, 111731, 113117, 113131, 113171, 115151, 131113, 131171, 131311, 131711, 171131, 311711, 511151, 515111, 711131, 911111, 1111213 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
The linked table includes probable primes. - Jens Kruse Andersen, Jul 21 2014
LINKS
K. D. Bajpai and Jens Kruse Andersen, Table of n, a(n) for n = 1..10000 (first 68 terms from K. D. Bajpai)
EXAMPLE
127 is prime. 1 + 2 + 7 = 10 = 2 * 5 and 1 * 2 * 7 = 14 = 2 * 7, both are semiprime.
1571 is prime. 1 + 5 + 7 + 1 = 14 = 2 * 7 and 1 * 5 * 7 * 1 = 35 = 5 * 7, both are semiprime.
MATHEMATICA
Select[Prime[Range[100000]], PrimeOmega[(Times @@ IntegerDigits[#])] == 2 && PrimeOmega[(Plus @@ IntegerDigits[#])] == 2 &]
PROG
(PARI)
issemiprime(p) = p>0 && bigomega(p)==2
s=[]; forprime(p=2, 1200000, d=digits(p); if(issemiprime(sum(k=1, #d, d[k])) && issemiprime(prod(k=1, #d, d[k])), s=concat(s, p))); s \\ Colin Barker, Jul 20 2014
(PARI) f(n, b, s, d) = if(d, for(i=1, 9, if(b+bigomega(i)<=2, f(10*n+i, b+bigomega(i), s+i, d-1))), if(b==2 && bigomega(s)==2 && isprime(n), print1(n", ")))
for(d=1, 8, f(0, 0, 0, d)) \\ Faster program. f(0, 0, 0, d) prints d-digit terms. Jens Kruse Andersen, Jul 21 2014
CROSSREFS
Sequence in context: A061237 A158293 A107579 * A050528 A257074 A357935
KEYWORD
nonn,base
AUTHOR
K. D. Bajpai, Jul 20 2014
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 11:24 EDT 2024. Contains 371967 sequences. (Running on oeis4.)