A291208 Number of noncube divisors of n.
0, 1, 1, 2, 1, 3, 1, 2, 2, 3, 1, 5, 1, 3, 3, 3, 1, 5, 1, 5, 3, 3, 1, 6, 2, 3, 2, 5, 1, 7, 1, 4, 3, 3, 3, 8, 1, 3, 3, 6, 1, 7, 1, 5, 5, 3, 1, 8, 2, 5, 3, 5, 1, 6, 3, 6, 3, 3, 1, 11, 1, 3, 5, 4, 3, 7, 1, 5, 3, 7, 1, 10, 1, 3, 5, 5, 3, 7, 1, 8, 3, 3, 1, 11, 3, 3, 3, 6, 1, 11, 3, 5, 3, 3, 3, 10, 1, 5, 5, 8, 1, 7, 1, 6, 7
Offset: 1
Keywords
Examples
a(8) = 2 because 8 has 4 divisors {1, 2, 4, 8} among which 2 are noncubes {2, 4}.
Links
Programs
-
Mathematica
nmax = 105; Rest[CoefficientList[Series[Sum[(x^k - x^k^3)/((1 - x^k) (1 - x^k^3)), {k, 1, nmax}], {x, 0, nmax}], x]] f1[p_, e_] := e + 1; f2[p_, e_] := 1 + Floor[e/3]; a[1] = 0; a[n_] := Module[{fct = FactorInteger[n]}, Times @@ f1 @@@ fct - Times @@ f2 @@@ fct]; Array[a, 100] (* Amiram Eldar, Jan 30 2025 *)
-
PARI
a(n) = sumdiv(n, d, !ispower(d, 3)); \\ Michel Marcus, Aug 21 2017
-
Python
from math import prod from sympy import factorint def A291208(n): f = factorint(n).values() return prod(e+1 for e in f)-prod(e//3+1 for e in f) # Chai Wah Wu, Jun 05 2025
Formula
G.f.: Sum_{k>=1} (x^k - x^(k^3))/((1 - x^k)*(1 - x^(k^3))).
From Amiram Eldar, Jan 30 2025: (Start)
Dirichlet g.f.: zeta(s) * (zeta(s) - zeta(3*s)).
Sum_{k=1..n} a(k) ~ n*(log(n) + 2*gamma - zeta(3) - 1), where gamma is Euler's constant (A001620). (End)