A169594 Number of divisors of n, counting divisor multiplicity in n.
1, 2, 2, 4, 2, 4, 2, 6, 4, 4, 2, 7, 2, 4, 4, 9, 2, 7, 2, 7, 4, 4, 2, 10, 4, 4, 6, 7, 2, 8, 2, 11, 4, 4, 4, 12, 2, 4, 4, 10, 2, 8, 2, 7, 7, 4, 2, 14, 4, 7, 4, 7, 2, 10, 4, 10, 4, 4, 2, 13, 2, 4, 7, 15, 4, 8, 2, 7, 4, 8, 2, 16, 2, 4, 7, 7, 4, 8, 2, 14, 9, 4, 2, 13, 4, 4, 4, 10, 2, 13, 4, 7, 4, 4, 4, 17, 2, 7
Offset: 1
Examples
The divisors of 8 are 1, 2, 4, 8 of multiplicity 1, 3, 1, 1, respectively. So a(8) = 1 + 3 + 1 + 1 = 6.
Links
- Antti Karttunen, Table of n, a(n) for n = 1..10000
Crossrefs
Cf. A168512.
A057567 counts chains of divisors with weakly increasing first quotients.
A067824 counts strict chains of divisors ending with n.
A253249 counts strict chains of divisors.
A334997 counts chains of divisors of n by length.
A342086 counts chains of divisors with strictly increasing first quotients.
A342496 counts partitions with equal first quotients (strict: A342515, ranking: A342522, ordered: A342495).
A342530 counts chains of divisors with distinct first quotients.
Programs
-
Maple
a := n -> ifelse(n < 2, 1, 1 + add(padic:-ordp(n, k), k = 2..n)): seq(a(n), n = 1..98); # Peter Luschny, Apr 10 2025
-
Mathematica
divmult[d_, n_] := Module[{output, i}, If[d == 1, output = 1, If[d == n, output = 1, i = 0; While[Mod[n, d^(i + 1)] == 0, i = i + 1]; output = i]]; output]; dmt0[n_] := Module[{divs, l}, divs = Divisors[n]; l = Length[divs]; Sum[divmult[divs[[i]], n], {i, 1, l}]]; Table[dmt0[i], {i, 1, 40}] Table[1 + DivisorSum[n, IntegerExponent[n, #] &, # > 1 &], {n, 98}] (* Michael De Vlieger, May 20 2017 *)
-
PARI
A286561(n,k) = { my(i=1); if(1==k, 1, while(!(n%(k^i)), i = i+1); (i-1)); }; A169594(n) = sumdiv(n,d,A286561(n,d)); \\ Antti Karttunen, May 20 2017
-
PARI
a(n) = { if(n == 1, return(1)); my(f = factor(n), u = vecmax(f[, 2]), cf = f, res = numdiv(f) - u + 1); for(i = 2, u, cf[, 2] = f[, 2]\i; res+=numdiv(factorback(cf)) ); res } \\ David A. Corneth, Mar 29 2021
-
Python
def a286561(n, k): i=1 if k==1: return 1 while n%(k**i)==0: i+=1 return i-1 def a(n): return sum([a286561(n, d) for d in divisors(n)]) # Indranil Ghosh, May 20 2017
-
Scheme
(define (A169594 n) (add (lambda (k) (A286561bi n k)) 1 n)) ;; Implements sum_{i=lowlim..uplim} intfun(i) (define (add intfun lowlim uplim) (let sumloop ((i lowlim) (res 0)) (cond ((> i uplim) res) (else (sumloop (1+ i) (+ res (intfun i))))))) ;; For A286561bi see A286561. - Antti Karttunen, May 20 2017
Formula
From Friedjof Tellkamp, Feb 29 2024: (Start)
a(n) = A309891(n) + 1.
G.f.: x/(1-x) + Sum_{k>=2, j>=1} x^(k^j)/(1-x^(k^j)).
Dirichlet g.f.: zeta(s) * (1 + Sum_{k>=1} (zeta(k*s) - 1)).
Sum_{n>=1} a(n)/n^2 = (7/24) * Pi^2. (End)
Extensions
Extended by Ray Chandler, Dec 08 2009
Comments