OFFSET
1,2
COMMENTS
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
EXAMPLE
a(30) = 10 because there are 10 numbers k <= 30 which are terms in A005932 (namely : 1,2,4,6,8,12,16,18,24,30).
MATHEMATICA
c = 0; fQ[x_] := Or[IntegerQ@ Log2[x], And[EvenQ[x], Union@ Differences@ PrimePi[FactorInteger[x][[All, 1]] ] == {1}] ]; Reap[Do[If[fQ[n], c++]; Sow[c], {n, 10^4}] ][[-1, 1]] (* Michael De Vlieger, Oct 13 2024 *)
PROG
(Python)
from itertools import count
from functools import lru_cache
from sympy import prime, integer_log, primorial
def A377028(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
c = 1
for k in count(1):
if primorial(k)>n:
break
c += g(n, k)
return c # Chai Wah Wu, Mar 18 2026
CROSSREFS
KEYWORD
nonn
AUTHOR
David James Sycamore, Oct 13 2024
EXTENSIONS
More terms from Michael De Vlieger, Oct 13 2024
STATUS
approved
