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!)
A338434 Sum of the numbers less than or equal to sqrt(n) whose square does not divide n. 6
0, 0, 0, 0, 2, 2, 2, 0, 2, 5, 5, 3, 5, 5, 5, 3, 9, 6, 9, 7, 9, 9, 9, 7, 9, 14, 11, 12, 14, 14, 14, 8, 14, 14, 14, 9, 20, 20, 20, 18, 20, 20, 20, 18, 17, 20, 20, 14, 20, 22, 27, 25, 27, 24, 27, 25, 27, 27, 27, 25, 27, 27, 24, 21, 35, 35, 35, 33, 35, 35, 35, 24, 35, 35, 30, 33, 35, 35, 35, 29, 32, 44, 44, 42, 44, 44, 44, 42, 44, 41, 44, 42, 44, 44, 44, 38, 44, 37, 41, 37 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,5
COMMENTS
Equal to sum of the numbers less than sqrt(n) whose square does not divide n. - Michel Marcus and Chai Wah Wu, Feb 07 2021
LINKS
FORMULA
a(n) = Sum_{k=1..floor(sqrt(n))} k * (ceiling(n/k^2) - floor(n/k^2)).
a(n) = floor(sqrt(n))*(floor(sqrt(n))+1)/2-sigma(sqrt(n/A007913(n)) = A000217(A000196(n))-A000203(sqrt(n/A007913(n)). - Chai Wah Wu, Jan 31 2021
EXAMPLE
a(9) = 2; floor(sqrt(n)) = 3 and 2^2 does not divide 9, so a(9) = 2.
a(10) = 5; floor(sqrt(n)) = 3 and the squares of 2 and 3 do not divide 10, so a(10) = 2 + 3 = 5.
MATHEMATICA
Table[Sum[k (Ceiling[n/k^2] - Floor[n/k^2]), {k, Sqrt[n]}], {n, 100}]
PROG
(PARI) a(n) = sum(k=1, sqrtint(n), if (n % k^2, k)); \\ Michel Marcus, Jan 31 2021
(Python)
from sympy import divisor_sigma, integer_nthroot
from sympy.ntheory.factor_ import core
def A338434(n):
m = integer_nthroot(n, 2)[0]
return m*(m+1)//2-divisor_sigma(integer_nthroot(n//core(n, 2), 2)[0]) # Chai Wah Wu, Jan 31 2021
CROSSREFS
Sequence in context: A349437 A215594 A230291 * A059288 A319109 A217670
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 September 10 19:40 EDT 2024. Contains 375794 sequences. (Running on oeis4.)