A056692 Number of divisors k of n with gcd(k-1, n) = 1.
1, 1, 1, 2, 1, 2, 1, 3, 2, 2, 1, 3, 1, 2, 3, 4, 1, 3, 1, 4, 2, 2, 1, 5, 2, 2, 3, 4, 1, 2, 1, 5, 3, 2, 3, 5, 1, 2, 2, 6, 1, 4, 1, 4, 5, 2, 1, 6, 2, 3, 3, 4, 1, 4, 2, 5, 2, 2, 1, 5, 1, 2, 4, 6, 3, 3, 1, 4, 3, 4, 1, 8, 1, 2, 4, 4, 3, 4, 1, 7, 4, 2, 1, 6, 3, 2, 3, 6, 1, 4, 3, 4, 2, 2, 3, 8, 1, 3, 5, 6, 1, 3, 1, 6, 4
Offset: 1
Keywords
Examples
The positive divisors of 8 are 1, 2, 4, 8. (2-1), (4-1) and (8-1) are relatively prime to 8, so a(8) = 3.
Links
- Antti Karttunen, Table of n, a(n) for n = 1..16384
Programs
-
Mathematica
Table[DivisorSum[n, 1 &, CoprimeQ[# - 1, n] &], {n, 105}] (* Michael De Vlieger, Oct 30 2017 *)
-
PARI
A056692(n) = sumdiv(n,d,(1==gcd(d-1,n))); \\ Antti Karttunen, Oct 30 2017