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.

A108606 Semiprimes with prime sum of digits.

Original entry on oeis.org

14, 21, 25, 34, 38, 49, 58, 65, 74, 85, 94, 106, 111, 115, 119, 122, 133, 142, 146, 155, 166, 201, 203, 205, 209, 214, 218, 221, 247, 254, 265, 274, 278, 287, 289, 298, 302, 319, 326, 335, 346, 355, 362, 371, 377, 382, 386, 391, 395, 403, 407, 427, 445, 454
Offset: 1

Views

Author

Zak Seidov, Jun 12 2005

Keywords

Comments

34 is the smallest term in common with A108605.

Examples

			34 = 2*17 (semiprime) and 2 + 17 = 19 is prime.
		

Crossrefs

Cf. A001358 (semiprimes), A101605 (3-almost primes), A108605 (semiprimes with prime sum of factors), A108607 (intersection of A108605 and A108606).

Programs

  • Mathematica
    A108606=Select[Range[1000], Plus@@(Transpose[FactorInteger[ # ]])[[2]]==2&& PrimeQ[Plus@@IntegerDigits[ # ]]&]
    DeleteCases[ParallelTable[If[PrimeOmega[n]==2&&PrimeQ[Total[IntegerDigits[n]]],n,a],{n,0,126181}],a] (* J.W.L. (Jan) Eerland, Dec 21 2021 *)
  • PARI
    select(isA108606(n)={bigomega(n)==2&&isprime(sumdigits(n))},[1..1000]) \\ J.W.L. (Jan) Eerland, Dec 23 2021
    
  • Python
    from sympy import isprime, factorint
    def ok(n): return isprime(sum(map(int, str(n)))) and sum(factorint(n).values()) == 2
    print([k for k in range(455) if ok(k)]) # Michael S. Branicky, Aug 22 2022