OFFSET
1,2
COMMENTS
Number of divisors d of n such that n/d == 1 (mod d). Such divisors must be unitary divisors.
Up to n = 10000, the largest value in this sequence is 7; the first occurrence of each integer up to 7 in the sequence is 1, 2, 6, 42, 30, 210, 2310; which except for 42 is the primorial numbers. However, a(30030) = 7.
If n is the product of two distinct primes then a(n) = 2 if and only if there are no nontrivial groups of order n. This relation does not hold if n is the product of 3 or more distinct primes or is not squarefree.
First occurrences: a(1) = 1, a(2) = 2, a(6) = 3, a(42) = 4, a(30) = 5, a(210) = 6, a(2310) = 7, a(87780) = 8, a(53130) = 9, a(7375830) = 10, a(172320330) = 11. - Charles R Greathouse IV, Jun 01 2016
LINKS
Franklin T. Adams-Watters, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Unitary Divisor.
FORMULA
a(n) = Sum_{k=1..n} (floor((k^2-k)/n) - floor((k^2-k-1)/n))*(floor(n/k) - floor((n-1)/k)). - Anthony Browne, Jun 01 2016
2 <= a(n) <= 2*omega(n) for n > 1. In particular a(p^e) = 2 for each prime p and each e > 0. - Charles R Greathouse IV, Jun 01 2016
MATHEMATICA
Table[Sum[(Floor[(k^2 - k)/n] - Floor[(k^2 - k - 1)/n])*(Floor[n/k] - Floor[(n - 1)/k]), {k, 1, n}], {n, 1, 50}] (* G. C. Greubel, Aug 02 2017 *)
PROG
(PARI) al(n)=local(m); m=sqrtint(n); Vec(sum(k=1, m, (x^k+x*O(x^n))/(1-x^(k^2))+x^(m+1)/(1-x)))
(PARI) a(n)=local(d, r); r=0; d=divisors(n); for(k=1, #d, if((n-d[k])%d[k]^2==0, r++)); r
(PARI) a(n)=sumdiv(n, d, (n-d)%d^2==0) \\ Charles R Greathouse IV, Jun 01 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Franklin T. Adams-Watters, Aug 02 2009
STATUS
approved