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!)
A361982 a(n) = 1 + Sum_{k=2..n} (-1)^k * k * a(floor(n/k)). 5
1, 3, 0, 8, 3, -3, -10, 22, 22, 12, 1, -23, -36, -50, -35, 93, 76, 76, 57, 17, 38, 16, -7, -103, -103, -129, -129, -185, -214, -184, -215, 297, 330, 296, 331, 331, 294, 256, 295, 135, 94, 136, 93, 5, 5, -41, -88, -472, -472, -472, -421, -525, -578, -578, -523, -747, -690, -748 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
Sum_{k=1..n} (-1)^k * k * a(floor(n/k)) = -1.
G.f. A(x) satisfies -x = Sum_{k>=1} (-1)^k * k * (1 - x^k) * A(x^k).
PROG
(Python)
from functools import lru_cache
@lru_cache(maxsize=None)
def A361982(n):
if n <= 1:
return 1
c, j = 1, 2
k1 = n//j
while k1 > 1:
j2 = n//k1 + 1
c += (((j2<<1)-1 if j2&1 else -(j2<<1)+1)+(-(j<<1)+1 if j&1 else (j<<1)-1)>>2)*A361982(k1)
j, k1 = j2, n//j2
return c+((-(n<<1)-1 if n&1 else (n<<1)+1)+(-(j<<1)+1 if j&1 else (j<<1)-1)>>2) # Chai Wah Wu, Apr 02 2023
CROSSREFS
Partial sums of A332793.
Cf. A068340.
Sequence in context: A200507 A348333 A296042 * A180661 A363053 A174474
KEYWORD
sign,look
AUTHOR
Seiichi Manyama, Apr 02 2023
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 15 18:29 EDT 2024. Contains 372549 sequences. (Running on oeis4.)