This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A161840 #37 Sep 22 2024 14:54:50 %S A161840 0,0,0,2,0,2,0,2,2,2,0,4,0,2,2,4,0,4,0,4,2,2,0,6,2,2,2,4,0,6,0,4,2,2, %T A161840 2,8,0,2,2,6,0,6,0,4,4,2,0,8,2,4,2,4,0,6,2,6,2,2,0,10,0,2,4,6,2,6,0,4, %U A161840 2,6,0,10,0,2,4,4,2,6,0,8,4,2,0,10,2,2,2,6,0,10,2,4,2,2,2,10,0,4,4,8 %N A161840 Number of noncentral divisors of n. %C A161840 Noncentral divisors in the following sense: if we sort the divisors of n in natural order, there is one "central", median divisor if the number of divisors tau(n) = A000005(n) is odd, and there are two "central" divisors if tau(n) is even. a(n) is the number of divisors not counting the median or two central divisors. %H A161840 Antti Karttunen, <a href="/A161840/b161840.txt">Table of n, a(n) for n = 1..10000</a> %H A161840 <a href="/index/Eu#epf">Index entries for sequences computed from exponents in factorization of n</a>. %F A161840 a(n) = tau(n)-2 + (tau(n) mod 2), tau = A000005. %F A161840 a(n) = A000005(n) - A049240(n) - 1. %F A161840 a(n) = A000005(n) + A010052(n) - 2. %F A161840 a(n) = A000005(n) - A169695(n). %F A161840 For n >= 2, a(n) = A200213(n) + 2*A010052(n). - _Antti Karttunen_, Jul 07 2017 %F A161840 a(n) = 2*A072670(n-1). - _Omar E. Pol_, Jul 08 2017 %F A161840 Sum_{k=1..n} a(k) ~ n * (log(n) + 2*gamma - 3), where gamma is Euler's constant (A001620). - _Amiram Eldar_, Jan 14 2024 %e A161840 The divisors of 4 are 1, 2, 4 so the noncentral divisors of 4 are 1, 4 because its central divisor is 2. %e A161840 The divisors of 12 are 1, 2, 3, 4, 6, 12 so the noncentral divisors of 12 are 1, 2, 6, 12 because its central divisors are 3, 4. %p A161840 A000005 := proc(n) numtheory[tau](n) ; end: A010052 := proc(n) if issqr(n) then 1; else 0 ; fi; end: A161840 := proc(n) A000005(n)+A010052(n)-2 ; end: seq(A161840(n),n=1..100) ; # _R. J. Mathar_, Jul 04 2009 %t A161840 If[EvenQ[#],#-2,#-1]&/@DivisorSigma[0,Range[100]] (* _Harvey P. Dale_, Sep 22 2024 *) %o A161840 (PARI) A161840(n) = numdiv(n)+issquare(n)-2; \\ _Antti Karttunen_, Jul 07 2017 %o A161840 (Scheme) (define (A161840 n) (+ (A000005 n) (A010052 n) -2)) ;; _Antti Karttunen_, Jul 07 2017 %Y A161840 Cf. A000005, A001620, A049240, A010052, A161841, A169695, A183002, A183003, A200213, A323643. %K A161840 easy,nonn %O A161840 1,4 %A A161840 _Omar E. Pol_, Jun 21 2009 %E A161840 More terms from _R. J. Mathar_, Jul 04 2009