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.

A355441 Numbers k such that the sum of the least prime factors of i=2..k is prime.

Original entry on oeis.org

2, 3, 4, 8, 12, 15, 16, 20, 24, 40, 43, 52, 55, 60, 63, 68, 72, 79, 87, 95, 96, 108, 111, 120, 123, 136, 140, 148, 151, 160, 184, 211, 215, 216, 227, 232, 235, 239, 252, 255, 256, 260, 264, 280, 283, 288, 299, 307, 323, 324, 327, 332, 360, 363, 371, 372, 375, 379
Offset: 1

Views

Author

Jean-Marc Rebert, Jul 02 2022

Keywords

Examples

			8 is a term since the least prime factors of 2..8 are 2, 3, 2, 5, 2, 7, 2 and their sum 23 is prime.
		

Crossrefs

Cf. A088821.

Programs

  • Mathematica
    Position[Accumulate[Join[{0}, Table[FactorInteger[k][[1, 1]], {k, 2, 400}]]], ?PrimeQ] // Flatten (* _Amiram Eldar, Jul 02 2022 *)
  • PARI
    isok(k) = isprime(sum(i=2, k, factor(i)[1,1])); \\ Michel Marcus, Jul 04 2022
  • Python
    from sympy import isprime, factorint
    from itertools import accumulate, count, islice
    def agen(): yield from (k for k, sk in enumerate(accumulate(min(factorint(i)) for i in count(2)), 2) if isprime(sk))
    print(list(islice(agen(), 75))) # Michael S. Branicky, Jul 02 2022