login
A124830
Number of distinct prime factors of A055932(n).
5
0, 1, 1, 2, 1, 2, 1, 2, 2, 3, 1, 2, 2, 2, 3, 1, 2, 3, 2, 2, 3, 1, 2, 3, 2, 3, 2, 4, 2, 3, 1, 3, 2, 3, 2, 3, 2, 4, 2, 3, 3, 2, 1, 3, 2, 3, 4, 2, 3, 3, 2, 3, 4, 2, 3, 3, 2, 1, 4, 3, 2, 3, 4, 2, 3, 3, 2, 4, 3, 2, 3, 4, 2, 3, 4, 3, 2, 1, 4, 3, 3, 2, 5, 3, 3, 4, 2, 3, 3, 2, 4, 3, 2, 4, 3, 4, 2, 3, 3, 4, 3, 2, 3, 1, 4
OFFSET
1,4
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000 (First 1000 terms from G. C. Greubel.)
FORMULA
a(n) = A001221(A055932(n)).
MATHEMATICA
PrimeNu /@ Select[Range[4000], ! MemberQ[Function[f, ReplacePart[Table[0, {PrimePi[f[[-1, 1]]]}], #] &@ Map[PrimePi@ First@ # -> Last@ # &, f]]@ FactorInteger@ #, 0] &] (* Michael De Vlieger, Feb 02 2017 *)
A055932[n_] := Module[{f = Transpose[FactorInteger[n]][[1]]}, f == {1} || f == Prime[Range[Length[f]]]]; PrimeNu[Select[Range[2000], A055932]] (* G. C. Greubel, May 11 2017 *)
PROG
(Python)
from sympy import nextprime, primefactors
def a053669(n):
p = 2
while True:
if n%p!=0: return p
else: p=nextprime(p)
def ok(n): return True if n==1 else a053669(n)>max(primefactors(n))
print([len(primefactors(n)) for n in range(1, 10001) if ok(n)]) # Indranil Ghosh, May 11 2017
(Python)
from functools import lru_cache
from itertools import count
from sympy import prime, integer_log, primorial, primenu
from oeis_sequences.OEISsequences import bisection
def A124830(n):
@lru_cache(maxsize=None)
def g(x, m): return sum(g(x//(prime(m)**i), m-1) for i in range(1, integer_log(x, prime(m))[0]+1)) if m-1 else x.bit_length()-1
def f(x):
c = n-1+x
for k in count(1):
if primorial(k)>x:
break
c -= g(x, k)
return c
return primenu(bisection(f, n, n)) # Chai Wah Wu, Mar 19 2026
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved