OFFSET
0,6
LINKS
Michael De Vlieger, Table of n, a(n) for n = 0..100
FORMULA
EXAMPLE
a(0)..a(3) = 0 since 12 is the smallest number in A332785.
a(4) = 1 since only 12 is no larger than 2^4 = 16.
a(5) = 5 since a(4) = 1, and additionally, 4 more numbers in A332785 are no larger than 2^5 = 32, these are {18, 20, 24, 28}.
a(6) = 15 since a(5) = 5, and additionally, 10 more are no larger than 2^6 = 64, i.e., {40, 44, 45, 48, 50, 52, 54, 56, 60, 63}, etc.
MATHEMATICA
Table[1 + 2^n - Sum[Abs[MoebiusMu[j]]*Floor[Sqrt[(2^n)/j^3]], {j, 2^(n/3)}] - Sum[MoebiusMu[k]*Floor[(2^n)/k^2], {k, 2^(n/2)}], {n, 0, 30}]
PROG
(Python)
from math import isqrt
from sympy import integer_nthroot
from oeis_sequences.OEISsequences import squarefreepi
def A394767(n):
m = 1<<n
c, l, j = m+1-squarefreepi(integer_nthroot(m, 3)[0])-squarefreepi(m), 0, isqrt(m)
while j>1:
k2 = integer_nthroot(m//j**2, 3)[0]+1
w = squarefreepi(k2-1)
c += j*(l-w)
l, j = w, isqrt(m//k2**3)
return c+l # Chai Wah Wu, Apr 11 2026
CROSSREFS
KEYWORD
nonn
AUTHOR
Michael De Vlieger, Apr 03 2026
STATUS
approved
