OFFSET
1,2
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10000
FORMULA
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
(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