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.

A329522 Composite numbers whose sum of digits is not composite.

Original entry on oeis.org

10, 12, 14, 16, 20, 21, 25, 30, 32, 34, 38, 49, 50, 52, 56, 58, 65, 70, 74, 76, 85, 92, 94, 98, 100, 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
Offset: 1

Views

Author

Ali Adams, Nov 15 2019

Keywords

Crossrefs

Programs

  • Magma
    [k:k in [2..230]| not IsPrime(k) and (IsPrime(&+Intseq(k)) or &+Intseq(k) eq 1) ]; // Marius A. Burtea, Feb 05 2020
  • Mathematica
    Select[Rest@ Complement[#, Prime@ Range@ PrimePi@ Max@ #] &@ Range@ 230, ! CompositeQ@ Total@ IntegerDigits@ # &] (* Michael De Vlieger, Nov 15 2019 *)
    Select[Range[250],CompositeQ[#]&&!CompositeQ[Total[IntegerDigits[#]]]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 19 2021 *)
  • PARI
    lista(nn) = forcomposite(c=1, nn, my(s=sumdigits(c)); if ((s==1) || isprime(s), print1(c, ", "))); \\ Michel Marcus, Nov 15 2019