login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A046522
a(n) = 2*floor(sqrt(n)) - d(n), where d(n) is the number of divisors of n (A000005).
6
1, 0, 0, 1, 2, 0, 2, 0, 3, 2, 4, 0, 4, 2, 2, 3, 6, 2, 6, 2, 4, 4, 6, 0, 7, 6, 6, 4, 8, 2, 8, 4, 6, 6, 6, 3, 10, 8, 8, 4, 10, 4, 10, 6, 6, 8, 10, 2, 11, 8, 10, 8, 12, 6, 10, 6, 10, 10, 12, 2, 12, 10, 8, 9, 12, 8, 14, 10, 12, 8, 14, 4, 14, 12, 10, 10, 12, 8, 14, 6
OFFSET
1,5
COMMENTS
Always >= 0.
REFERENCES
D. S. Mitrinovic et al., Handbook of Number Theory, Kluwer, Section II.1.1.
LINKS
MAPLE
with(numtheory); f := n->2*floor(sqrt(n))-sigma[ 0 ](n);
MATHEMATICA
Table[2Floor[Sqrt[n]]-DivisorSigma[0, n], {n, 80}] (* Harvey P. Dale, Nov 27 2013 *)
PROG
(PARI) a(n)={2*sqrtint(n)-numdiv(n)} \\ Andrew Howroyd, Mar 07 2020
CROSSREFS
Sequence in context: A259525 A319071 A316432 * A242896 A240183 A112631
KEYWORD
nonn,easy
STATUS
approved