login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A046522 a(n) = 2*floor(sqrt(n)) - d(n), where d(n) is the number of divisors of n (A000005). 6

%I #16 Mar 08 2020 00:20:15

%S 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,

%T 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,

%U 8,9,12,8,14,10,12,8,14,4,14,12,10,10,12,8,14,6

%N a(n) = 2*floor(sqrt(n)) - d(n), where d(n) is the number of divisors of n (A000005).

%C Always >= 0.

%D D. S. Mitrinovic et al., Handbook of Number Theory, Kluwer, Section II.1.1.

%H Nathaniel Johnston, <a href="/A046522/b046522.txt">Table of n, a(n) for n = 1..10000</a>

%p with(numtheory); f := n->2*floor(sqrt(n))-sigma[ 0 ](n);

%t Table[2Floor[Sqrt[n]]-DivisorSigma[0,n],{n,80}] (* _Harvey P. Dale_, Nov 27 2013 *)

%o (PARI) a(n)={2*sqrtint(n)-numdiv(n)} \\ _Andrew Howroyd_, Mar 07 2020

%K nonn,easy

%O 1,5

%A _N. J. A. Sloane_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 20:33 EDT 2024. Contains 371916 sequences. (Running on oeis4.)