OFFSET
1,2
COMMENTS
The nonzero terms of A048105.
Also number of nonsquarefree divisors of the n-th nonsquarefree number. The terms in A013929 which correspond to records in this sequence are given by A309141(n); n >= 2. - David James Sycamore, Jan 07 2025
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..1000 from G. C. Greubel)
FORMULA
From Amiram Eldar, Dec 09 2023: (Start)
Sum_{k=1..n} a(k) ~ (n/zeta(2)) * (log(n) + 2*gamma - 1 - 2*zeta'(2)/zeta(2)), where gamma is Euler's constant (A001620). (End)
EXAMPLE
For n = 4, the fourth nonsquarefree number is A013929(4) = 12 which has 2 non-unitary divisors, 2 and 6. Therefore a(4) = 2.
The number of nonsquarefree divisors of 12 is also = 2 (4 and 12). For n = 55, A013929(55) = 144 so by the third formula above a(55) = A000005(144) - A000005(6) = 15 - 4 = 11 = number of nonsquarefree divisors of 144 (4,8,9,12,16,18,24,36,48,72,144). - David James Sycamore, Jan 07 2025
MATHEMATICA
Select[Table[DivisorSigma[0, n] - 2^(PrimeNu[n]), {n, 1, 500}], # > 0 &] (* G. C. Greubel, May 21 2017 *)
PROG
(PARI) lista(kmax) = {my(f); for(k = 1, kmax, f = factor(k); if(!issquarefree(f), print1(numdiv(f) - 2^omega(f), ", "))); } \\ Amiram Eldar, Dec 09 2023
(Python)
from math import prod, isqrt
from sympy import mobius, factorint
def A174961(n):
def f(x): return n+sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))
m, k = n, f(n)
while m != k:
m, k = k, f(k)
return -(1<<len(g:=factorint(m).values()))+prod(e+1 for e in g) # Chai Wah Wu, Aug 12 2024
CROSSREFS
KEYWORD
nonn,changed
AUTHOR
N. Wu (neil_wu0626(AT)yahoo.com), Apr 02 2010
EXTENSIONS
Edited by Amiram Eldar, Dec 09 2023
STATUS
approved