The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A345321 Sum of the divisors of n whose cube does not divide n. 1
0, 2, 3, 6, 5, 11, 7, 12, 12, 17, 11, 27, 13, 23, 23, 28, 17, 38, 19, 41, 31, 35, 23, 57, 30, 41, 36, 55, 29, 71, 31, 60, 47, 53, 47, 90, 37, 59, 55, 87, 41, 95, 43, 83, 77, 71, 47, 121, 56, 92, 71, 97, 53, 116, 71, 117, 79, 89, 59, 167, 61, 95, 103, 120, 83, 143, 67, 125, 95 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
a(n) = Sum_{k=1..n} k * (ceiling(n/k^3) - floor(n/k^3)) * (1 - ceiling(n/k) + floor(n/k)).
a(n) = A000203(n) - A333843(n). - Rémy Sigrist, Jun 14 2021
EXAMPLE
a(16) = 28; The divisors of 16 whose cube does not divide 16 are: 4, 8 and 16. The sum of these divisors is then 4 + 8 + 16 = 28.
MATHEMATICA
Table[Sum[k (Ceiling[n/k^3] - Floor[n/k^3]) (1 - Ceiling[n/k] + Floor[n/k]), {k, n}], {n, 80}]
Table[Total[Select[Divisors[n], Mod[n, #^3]!=0&]], {n, 100}] (* Harvey P. Dale, May 01 2022 *)
PROG
(PARI) a(n) = sumdiv(n, d, if (n % d^3, d)); \\ Michel Marcus, Jun 13 2021
(Python 3.8+)
from math import prod
from sympy import factorint
def A345321(n):
f = factorint(n).items()
return prod((p**(q+1)-1)//(p-1) for p, q in f) - prod((p**(q//3+1)-1)//(p-1) for p, q in f) # Chai Wah Wu, Jun 14 2021
CROSSREFS
Sequence in context: A350337 A133477 A303695 * A350339 A039653 A335372
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, Jun 13 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 May 13 05:55 EDT 2024. Contains 372498 sequences. (Running on oeis4.)