OFFSET
1,4
COMMENTS
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
Michael De Vlieger, Diagram illustrating a(1440) = 20. Terms are arranged according to prime decomposition and sorted vertically. This sequence counts primes (red) and perfect prime powers (gold).
FORMULA
a(n) = Sum_{p | n} floor(log n / log p).
a(n) = number of prime powers in row n of A162306.
a(p) = tau(p) - 1 = rcf(p) - 1 = 1 since S = row p of both A027750 and A162306 = {1, p} contains the prime power p.
a(p^m) = tau(p^m) - 1 = rcf(p^m) = 1 = m since S = row p^m of both A027750 and A162306 = {1, p, p^2, ..., p^m} contains the prime powers {p, p^2, ..., p^m}.
EXAMPLE
Let S = {k <= n : rad(k) | n} = row n of A162306
a(1) = 0 since S = {1} has 0 prime powers.
a(2) = 1 since S = {1, [2]} has 1 prime power.
a(4) = 2 since S = {1, [2, 4]} has 2 prime powers.
a(6) = 3 since S = {1, [2, 3, 4], 6} has 3 prime powers.
a(10) = 4 since S = {1, [2, 4, 5, 8], 10} has 4 prime powers.
a(12) = 5 since S = {1, [2, 3, 4], 6, [8, 9], 12} has 5 prime powers, etc.
MAPLE
a := n -> add(ilog[p](n), p in NumberTheory:-PrimeFactors(n)):
seq(a(n), n = 1..92); # Peter Luschny, Jun 20 2024
MATHEMATICA
{0}~Join~Table[Total@ Map[Floor@ Log[#, n] &, FactorInteger[n][[All, 1]]], {n, 2, 120}]
PROG
(PARI) a(n) = if (n==1, 0, my(f=factor(n)[, 1]); sum(k=1, #f, logint(n, f[k]))); \\ Michel Marcus, Jun 20 2024
(Python)
from sympy import integer_log, primefactors
def A361373(n): return sum(integer_log(n, p)[0] for p in primefactors(n)) # Chai Wah Wu, Sep 20 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Michael De Vlieger, Jun 17 2024
STATUS
approved