A140774 Consider the products of all pairs of consecutive (when ordered by size) positive divisors of n. a(n) = the number of these products that divide n. a(n) also = the number of the products that are divisible by n.
0, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 3, 1, 2, 2, 2, 1, 3, 1, 2, 2, 2, 1, 4, 1, 2, 2, 2, 1, 4, 1, 3, 2, 2, 2, 3, 1, 2, 2, 4, 1, 3, 1, 2, 3, 2, 1, 5, 1, 3, 2, 2, 1, 4, 2, 4, 2, 2, 1, 6, 1, 2, 3, 3, 2, 3, 1, 2, 2, 4, 1, 5, 1, 2, 3, 2, 2, 3, 1, 5, 2, 2, 1, 5, 2, 2, 2, 3, 1, 5, 2, 2, 2, 2, 2, 6, 1, 3, 2, 3, 1, 3, 1, 3, 4
Offset: 1
Keywords
Examples
The divisors of 20 are 1,2,4,5,10,20. There are 2 pairs of consecutive divisors whose product divides 20: 1*2=2, 4*5 = 20. Likewise, there are 2 such products that are divisible by 20: 4*5=20, 10*20=200. So a(20) = 2.
Links
- Antti Karttunen, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Mathematica
f[n_] := Block[{d = Divisors@ n}, Count[n/((Most@d) (Rest@d)), Integer]]; Array[f, 105] (* _Robert G. Wilson v, May 30 2008 *)
-
PARI
\\ Two implementations, after the two different interpretations given by the author of the sequence: A140774v1(n) = { my(ds = divisors(n),s=0); if(1==n,0,for(i=1,(#ds)-1,if(!(n%(ds[i]*ds[1+i])),s=s+1))); s; } A140774v2(n) = { my(ds = divisors(n),s=0); if(1==n,0,for(i=1,(#ds)-1,if(!((ds[i]*ds[1+i])%n),s=s+1))); s; } \\ Antti Karttunen, May 19 2017
Extensions
More terms from Robert G. Wilson v, May 30 2008
Comments