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.

A346623 a(n) = Sum_{ x <= n : x odd and omega(x) = 2 } x.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 69, 69, 104, 104, 104, 104, 143, 143, 143, 143, 143, 143, 188, 188, 188, 188, 188, 188, 239, 239, 239, 239, 294, 294, 351, 351, 351, 351, 351, 351, 414, 414, 479, 479, 479, 479
Offset: 1

Views

Author

N. J. A. Sloane, Aug 23 2021

Keywords

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 0, a(n-1)+
         `if`(n::odd and nops(ifactors(n)[2])=2, n, 0))
        end:
    seq(a(n), n=1..68);  # Alois P. Heinz, Aug 23 2021
  • Mathematica
    a[n_] := a[n] = If[n == 1, 0, a[n-1] + If[OddQ[n] && PrimeNu[n] == 2, n, 0]];
    Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Feb 13 2023 *)
  • Python
    from sympy import primefactors
    def A346623(n):
        return 0 if n <= 2 else A346623(n-1) + (n if n % 2 and len(primefactors(n)) == 2 else 0) # Chai Wah Wu, Aug 23 2021