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))).
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
Keywords
Examples
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.
Links
- Antti Karttunen, Table of n, a(n) for n = 1..10000
Programs
-
Magma
[#Divisors( Gcd(n,#Divisors(n))):n in [1..120]]; // Marius A. Burtea, Aug 03 2019
-
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 *)
-
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
-
Scheme
(define (A138010 n) (A000005 (gcd n (A000005 n)))) ;; Antti Karttunen, May 25 2017
Formula
Extensions
More terms from Stefan Steinerberger and Emeric Deutsch, Feb 29 2008
Further extended (to 120 terms) by Antti Karttunen, May 25 2017