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
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, 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, 6, 6, 6, 3, 6, 6, 5, 5, 6, 6, 6, 4, 6, 7, 7, 6, 7, 7, 7, 6, 7, 6, 7, 6 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,17
LINKS
FORMULA
a(n) = floor(sqrt(n)) - 1 - Sum_{k=1..sqrt(n)-1} (1 - ceiling(n/k^2) + floor(n/k^2)).
EXAMPLE
a(16) = 1: floor(sqrt(16))-1 = 3 and 3^2 does not divide 16, so a(16) = 1;
a(17) = 2: floor(sqrt(17))-1 = 3 and the squares of 2 and 3 do not divide 17, so a(17) = 2.
MATHEMATICA
Table[Sum[Ceiling[n/k^2] - Floor[n/k^2], {k, Sqrt[n] - 1}], {n, 100}]
PROG
(PARI) a(n) = sum(k=1, floor(sqrt(n))-1, if (n % k^2, 1)); \\ Michel Marcus, Jan 31 2021
CROSSREFS
Sequence in context: A292375 A361702 A295218 * A223135 A084113 A323086
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Jan 30 2021
STATUS
approved

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 August 5 04:15 EDT 2024. Contains 374935 sequences. (Running on oeis4.)