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!)
A338430 Number of numbers less than sqrt(n) whose square does not divide n. 6

%I #21 Jun 30 2021 10:53:29

%S 0,0,0,0,0,0,0,0,1,1,1,0,1,1,1,1,2,1,2,1,2,2,2,1,3,3,2,2,3,3,3,1,3,3,

%T 3,2,4,4,4,3,4,4,4,3,3,4,4,2,5,4,5,4,5,4,5,4,5,5,5,4,5,5,4,4,6,6,6,5,

%U 6,6,6,3,6,6,5,5,6,6,6,4,6,7,7,6,7,7,7,6,7,6,7,6

%N Number of numbers less than sqrt(n) whose square does not divide n.

%H Felix Fröhlich, <a href="/A338430/b338430.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = floor(sqrt(n)) - 1 - Sum_{k=1..sqrt(n)-1} (1 - ceiling(n/k^2) + floor(n/k^2)).

%e a(16) = 1: floor(sqrt(16))-1 = 3 and 3^2 does not divide 16, so a(16) = 1;

%e a(17) = 2: floor(sqrt(17))-1 = 3 and the squares of 2 and 3 do not divide 17, so a(17) = 2.

%t Table[Sum[Ceiling[n/k^2] - Floor[n/k^2], {k, Sqrt[n] - 1}], {n, 100}]

%o (PARI) a(n) = sum(k=1, floor(sqrt(n))-1, if (n % k^2, 1)); \\ _Michel Marcus_, Jan 31 2021

%Y Cf. A338228, A338231, A338233, A338234, A338236, A338434.

%K nonn,easy

%O 1,17

%A _Wesley Ivan Hurt_, Jan 30 2021

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 September 10 20:50 EDT 2024. Contains 375794 sequences. (Running on oeis4.)