OFFSET
1,3
FORMULA
a(n) = n - Sum_{k=1..n} (ceiling(sigma_k(n)/k) - floor(sigma_k(n)/k)).
EXAMPLE
a(3) = 2; we have 1 | sigma_1(3) = 1 + 3 = 4 and 2 | sigma_2(3) = 1^2 + 3^2 = 10. (Note that 3 does not divide sigma_3(3) = 1^3 + 3^3 = 28.)
MATHEMATICA
Table[n - Sum[Ceiling[DivisorSigma[k, n]/k] - Floor[DivisorSigma[k, n]/k], {k, n}], {n, 100}]
PROG
(PARI) a(n) = sum(k=1, n, (sigma(n, k) % k) == 0); \\ Michel Marcus, Jan 13 2022
(Python)
from math import prod
from sympy import factorint
def A350743(n):
f = list(factorint(n).items())
return sum(1 for k in range(1, n+1) if prod(p**((q+1)*k)-1 for p, q in f)//prod(p**k-1 for p, q in f) % k == 0) # Chai Wah Wu, Jan 17 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, Jan 13 2022
STATUS
approved