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.

A363895 Floor of the average of the distinct prime factors of n.

Original entry on oeis.org

2, 3, 2, 5, 2, 7, 2, 3, 3, 11, 2, 13, 4, 4, 2, 17, 2, 19, 3, 5, 6, 23, 2, 5, 7, 3, 4, 29, 3, 31, 2, 7, 9, 6, 2, 37, 10, 8, 3, 41, 4, 43, 6, 4, 12, 47, 2, 7, 3, 10, 7, 53, 2, 8, 4, 11, 15, 59, 3, 61, 16, 5, 2, 9, 5, 67, 9, 13, 4, 71, 2, 73, 19, 4, 10, 9, 6, 79
Offset: 2

Views

Author

DarĂ­o Clavijo, Jun 26 2023

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Floor[Mean[FactorInteger[n][[;; , 1]]]]; Array[a, 100, 2] (* Amiram Eldar, Jun 27 2023 *)
  • PARI
    a(n) = my(p = factor(n)[, 1]); vecsum(p)\#p; \\ Amiram Eldar, Jun 29 2023
  • Python
    from sympy import factorint
    def a(n):
      P = factorint(n).keys()
      return int(sum(P)/len(P))
    print([a(n) for n in range(2, 85)])
    

Formula

a(p^n) = p, p prime, n >= 1.
a(n) = floor(A008472(n)/A001221(n)).
a(n) = floor(A323171(n)/A323172(n)).