login
A138010
a(n) is the number of positive divisors of n that divide d(n), where d(n) is the number of positive divisors of n, A000005(n); a(n) also equals d(gcd(n, d(n))).
4
1, 2, 1, 1, 1, 2, 1, 3, 2, 2, 1, 4, 1, 2, 1, 1, 1, 4, 1, 2, 1, 2, 1, 4, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 4, 1, 2, 1, 6, 1, 2, 2, 1, 1, 2, 1, 2, 1, 2, 1, 6, 1, 2, 2, 2, 1, 2, 1, 4, 1, 2, 1, 6, 1, 2, 1, 4, 1, 4, 1, 2, 1, 2, 1, 6, 1, 2, 2, 1, 1, 2, 1, 4, 1, 2, 1, 6, 1, 2, 1, 2, 1, 2, 1, 2, 2, 2, 1, 4
OFFSET
1,2
LINKS
FORMULA
a(n) = A000005(A009191(n)). [From the alternative description.] - Antti Karttunen, May 25 2017
EXAMPLE
12 has 6 divisors (1,2,3,4,6,12). Those divisors of 12 that divide 6 are 1,2,3,6. Since there are 4 of these, then a(12) = 4.
MAPLE
with(numtheory): a:=proc(n) local div, c, j: div:=divisors(n): c:=0: for j to tau(n) do if `mod`(tau(n), div[j])=0 then c:=c+1 else end if end do: c end proc: seq(a(n), n=1..90); # Emeric Deutsch, Mar 02 2008
MATHEMATICA
Table[Length[Select[Divisors[n], Mod[Length[Divisors[n]], # ] == 0 &]], {n, 1, 100}] (* Stefan Steinerberger, Feb 29 2008 *)
Table[Count[DivisorSigma[0, n]/Divisors[n], _?IntegerQ], {n, 120}] (* Harvey P. Dale, May 31 2019 *)
PROG
(PARI) A138010(n) = sumdiv(n, d, if(!(numdiv(n)%d), 1, 0)); \\ Antti Karttunen, May 25 2017
(Scheme) (define (A138010 n) (A000005 (gcd n (A000005 n)))) ;; Antti Karttunen, May 25 2017
(Python)
from sympy import divisors, divisor_count
def a(n): return sum([ 1*(divisor_count(n)%d==0) for d in divisors(n)]) # Indranil Ghosh, May 25 2017
(Magma) [#Divisors( Gcd(n, #Divisors(n))):n in [1..120]]; // Marius A. Burtea, Aug 03 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Feb 27 2008
EXTENSIONS
More terms from Stefan Steinerberger and Emeric Deutsch, Feb 29 2008
Further extended (to 120 terms) by Antti Karttunen, May 25 2017
STATUS
approved