login
A331072
a(n) = Sum_{k = 1..n} u_3(k), where u_3 = A034836.
1
1, 2, 3, 5, 6, 8, 9, 12, 14, 16, 17, 21, 22, 24, 26, 30, 31, 35, 36, 40, 42, 44, 45, 51, 53, 55, 58, 62, 63, 68, 69, 74, 76, 78, 80, 88, 89, 91, 93, 99, 100, 105, 106, 110, 114, 116, 117, 126, 128, 132, 134, 138, 139, 145, 147, 153, 155, 157, 158, 168, 169, 171, 175, 182, 184, 189, 190, 194, 196, 201, 202, 214, 215, 217
OFFSET
1,2
COMMENTS
For background references see A330570.
LINKS
MATHEMATICA
s[1] = 1; s[n_] := Module[{e = FactorInteger[n][[;; , 2]]}, If[IntegerQ[Surd[n, 3]], 1/3, 0] + (Times @@ ((e + 1)*(e + 2)/2))/6 + (Times @@ (Floor[e/2] + 1))/2]; Accumulate[Array[s, 100]] (* Amiram Eldar, Apr 19 2024 *)
PROG
(Python)
from math import isqrt
from sympy import integer_nthroot
def A331072(n):
c = (m:=integer_nthroot(n, 3)[0])*(m**2+2)+3*sum(-(s:=isqrt(r:=n//i))**2+(sum(r//k for k in range(1, s+1))<<1)-sum(n//(i*j) for j in range(1, m+1)) for i in range(1, m+1))
j = 1
while j**2 <= n:
k = n//j**2
c += 3*k*(-j+(j:=isqrt(n//k)+1))
return c//6 # Chai Wah Wu, May 28 2026
CROSSREFS
Cf. A034836.
A096276 has the same initial terms, but is a different sequence.
Sequence in context: A348195 A280744 A392221 * A096276 A371970 A239091
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jan 10 2020
STATUS
approved