The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A338228 Number of numbers less than or equal to n whose square does not divide n. 7
 0, 1, 2, 2, 4, 5, 6, 6, 7, 9, 10, 10, 12, 13, 14, 13, 16, 16, 18, 18, 20, 21, 22, 22, 23, 25, 25, 26, 28, 29, 30, 29, 32, 33, 34, 32, 36, 37, 38, 38, 40, 41, 42, 42, 43, 45, 46, 45, 47, 48, 50, 50, 52, 52, 54, 54, 56, 57, 58, 58, 60, 61, 61, 60, 64, 65, 66, 66, 68, 69, 70, 68, 72 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 LINKS FORMULA a(n) = n - Sum_{k=1..n} (1 - ceiling(n/k^2) + floor(n/k^2)). a(n) = n - tau(sqrt(n/A007913(n)) = n - A000005(sqrt(n/A007913(n)). - Chai Wah Wu, Feb 01 2021 a(n) = Sum_{k=1..n} sign(n mod k^2). - Wesley Ivan Hurt, May 09 2021 EXAMPLE a(3) = 2; 1^2|3, but 2^2 and 3^2 do not. So a(3) = 2. a(4) = 2; 1^2|4 and 2^2|4 but 3^2 and 4^2 do not, So a(4) = 2. MATHEMATICA Table[Sum[Ceiling[n/k^2] - Floor[n/k^2], {k, n}], {n, 100}] PROG (PARI) a(n) = sum(k=1, n, if (n % k^2, 1)); \\ Michel Marcus, Jan 31 2021 (Python) from sympy import divisor_count, integer_nthroot from sympy.ntheory.factor_ import core def A338228(n):     return n-divisor_count(integer_nthroot(n//core(n, 2), 2)[0]) # Chai Wah Wu, Feb 01 2021 CROSSREFS Cf. A338231, A338233, A338234, A338236, A338430, A338434. Sequence in context: A130498 A263433 A147806 * A064574 A059015 A325108 Adjacent sequences:  A338225 A338226 A338227 * A338229 A338230 A338231 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified June 23 11:29 EDT 2021. Contains 345397 sequences. (Running on oeis4.)