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!)
A338233 Number of numbers less than n whose square does not divide n. 7
0, 0, 1, 1, 3, 4, 5, 5, 6, 8, 9, 9, 11, 12, 13, 12, 15, 15, 17, 17, 19, 20, 21, 21, 22, 24, 24, 25, 27, 28, 29, 28, 31, 32, 33, 31, 35, 36, 37, 37, 39, 40, 41, 41, 42, 44, 45, 44, 46, 47, 49, 49, 51, 51, 53, 53, 55, 56, 57, 57, 59, 60, 60, 59, 63, 64, 65, 65, 67, 68, 69, 67 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,5
LINKS
FORMULA
a(n) = n - 1 - Sum_{k=1..n-1} (1 - ceiling(n/k^2) + floor(n/k^2)).
For n > 1, a(n) = n - 1 - tau(sqrt(n/A007913(n)) = n - A000005(sqrt(n/A007913(n)). - Chai Wah Wu, Feb 01 2021
EXAMPLE
a(7) = 5; 1^2|7, but the squares of 2,3,4,5 and 6 do not. So a(7) = 5.
a(8) = 5; 1^2|8 and 2^2|8, but the squares of 3,4,5,6,and 7 do not. So a(8) = 5.
MATHEMATICA
Table[Sum[Ceiling[n/k^2] - Floor[n/k^2], {k, n - 1}], {n, 100}]
PROG
(PARI) a(n) = sum(k=1, n-1, if (n % k^2, 1)); \\ Michel Marcus, Jan 31 2021
(Python)
def A338233(n):
return 0 if n <= 1 else n-1-divisor_count(integer_nthroot(n//core(n, 2), 2)[0]) # Chai Wah Wu, Feb 01 2021
CROSSREFS
Sequence in context: A200066 A227789 A116183 * A177744 A330195 A330101
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 April 19 23:40 EDT 2024. Contains 371798 sequences. (Running on oeis4.)