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.

A141642 Composite numbers whose sum of digits is a prime.

Original entry on oeis.org

12, 14, 16, 20, 21, 25, 30, 32, 34, 38, 49, 50, 52, 56, 58, 65, 70, 74, 76, 85, 92, 94, 98, 102, 104, 106, 110, 111, 115, 119, 120, 122, 124, 128, 133, 140, 142, 146, 148, 155, 160, 164, 166, 175, 182, 184, 188, 200, 201, 203, 205, 209, 210, 212, 214, 218, 221, 230, 232, 236
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Sep 03 2008

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[300],CompositeQ[#]&&PrimeQ[Total[IntegerDigits[#]]]&] (* Harvey P. Dale, Feb 19 2018 *)
  • Python
    from sympy import isprime
    def ok(n): return isprime(sum(map(int, str(n)))) and not isprime(n)
    print([k for k in range(237) if ok(k)]) # Michael S. Branicky, Dec 14 2021

Extensions

More terms from N. J. A. Sloane, Sep 03 2008