A066660 Number of divisors of 2n excluding 1.
1, 2, 3, 3, 3, 5, 3, 4, 5, 5, 3, 7, 3, 5, 7, 5, 3, 8, 3, 7, 7, 5, 3, 9, 5, 5, 7, 7, 3, 11, 3, 6, 7, 5, 7, 11, 3, 5, 7, 9, 3, 11, 3, 7, 11, 5, 3, 11, 5, 8, 7, 7, 3, 11, 7, 9, 7, 5, 3, 15, 3, 5, 11, 7, 7, 11, 3, 7, 7, 11, 3, 14, 3, 5, 11, 7, 7, 11, 3, 11, 9, 5, 3, 15, 7, 5, 7, 9, 3, 17, 7, 7, 7, 5, 7
Offset: 1
Examples
a(4)=3 because (4+0)/(4-0), (4+2)/(4-2), (4+3)/(4-3) are integers.
Links
- Harry J. Smith, Table of n, a(n) for n = 1..1000
- Vaclav Kotesovec, Graph - the asymptotic ratio
Programs
-
Magma
[DivisorSigma(0,2*n) -1: n in [1..100]]; // G. C. Greubel, Feb 13 2019
-
Maple
with(numtheory); A066660:=n->tau(2*n)-1; seq(A066660(n), n=1..100); # Wesley Ivan Hurt, Dec 22 2013
-
Mathematica
Table[DivisorSigma[0, 2 n] - 1, {n, 100}] (* Wesley Ivan Hurt, Dec 22 2013 *)
-
PARI
a(n)=if(n<1,0,sumdiv(n,d,(d>1)+d%2))
-
PARI
{a(n)=if(n<1, 0, numdiv(2*n)-1)} /* Michael Somos, Sep 03 2006 */
-
Sage
[sigma(2*n,0) -1 for n in (1..100)] # G. C. Greubel, Feb 13 2019
Formula
a(n) = A069930(n) + 1.
If n is an odd prime, then a(n)=3.
Asymptotic formula: 1/n*Sum(i=1, n, a(i)) = C*log(n) + o(log(n)) with C=3/2. [corrected by Vaclav Kotesovec, Feb 13 2019]
Also lim_{n -> infinity} card(i
G.f.: Sum_{n>0} x^n(1 - x^(3n))/((1 - x^n)(1 - x^(2n))).
a(n) = d(2n) - 1, where d(n) is the number of divisors of n (A000005). - Wesley Ivan Hurt, Dec 22 2013
a(n) = n - A234306(n). - Antti Karttunen, Dec 22 2013
a(n) = Sum_{i=1..n} floor(2*n/i) - floor((2*n-1)/i). - Wesley Ivan Hurt, Nov 15 2017
Sum_{k=1..n} a(k) ~ n/2 * (3*log(n) + log(2) + 6*gamma - 5), where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Feb 13 2019
A340261 T(n, k) is the number of integers that are less than or equal to k that do not divide n. Triangle read by rows, for 0 <= k <= n.
0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 2, 3, 3, 0, 0, 0, 1, 2, 2, 0, 1, 2, 3, 4, 5, 5, 0, 0, 1, 1, 2, 3, 4, 4, 0, 1, 1, 2, 3, 4, 5, 6, 6, 0, 0, 1, 2, 2, 3, 4, 5, 6, 6, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 6, 6, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 11
Offset: 1
Examples
Table starts: [1] 0; [2] 0, 0; [3] 0, 1, 1; [4] 0, 0, 1, 1; [5] 0, 1, 2, 3, 3; [6] 0, 0, 0, 1, 2, 2; [7] 0, 1, 2, 3, 4, 5, 5; [8] 0, 0, 1, 1, 2, 3, 4, 4; [9] 0, 1, 1, 2, 3, 4, 5, 6, 6; [10] 0, 0, 1, 2, 2, 3, 4, 5, 6, 6;
Crossrefs
Programs
-
Maple
IversonBrackets := expr -> subs(true=1, false=0, evalb(expr)): T := (n, k) -> add(IversonBrackets(irem(n, j) <> 0), j = 1..k): # Alternative: T := (n, k) -> nops({seq(j, j = 1..k)} minus numtheory:-divisors(n)): for n from 1 to 19 do seq(T(n, k), k = 1..n) od;
Formula
T(n, k) = Sum_{j=1..k} [n mod j <> 0], where [ ] are the Iverson brackets.
T(n, k) = card({j : j = 1..k} \ divisors(n)).
Comments