[go: up one dir, main page]

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!)
A359479 a(1) = 1; a(n) = Sum_{k=2..n} (-1)^k * k * a(floor(n/k)). 4
1, 2, -1, 5, 0, -3, -10, 14, 14, 9, -2, -20, -33, -40, -25, 71, 54, 54, 35, 5, 26, 15, -8, -80, -80, -93, -93, -135, -164, -149, -180, 204, 237, 220, 255, 255, 218, 199, 238, 118, 77, 98, 55, -11, -11, -34, -81, -369, -369, -369, -318, -396, -449, -449, -394, -562, -505, -534 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
Sum_{k=1..n} (-1)^k * k * a(floor(n/k)) = 0 for n > 1.
G.f. A(x) satisfies -x * (1 - x) = Sum_{k>=1} (-1)^k * k * (1 - x^k) * A(x^k).
MATHEMATICA
f[p_, e_] := If[e == 1, -p, 0]; f[2, e_] := If[e == 1, 1, 6*4^(e-2)]; s[1] = 1; s[n_] := Times @@ f @@@ FactorInteger[n]; Accumulate[Array[s, 100]] (* Amiram Eldar, May 09 2023 *)
PROG
(Python)
from functools import lru_cache
@lru_cache(maxsize=None)
def A359479(n):
if n <= 1:
return 1
c, j = 0, 2
k1 = n//j
while k1 > 1:
j2 = n//k1 + 1
c += ((j2>>1 if j2&1 else -(j2>>1))-(j>>1 if j&1 else -(j>>1)))*A359479(k1)
j, k1 = j2, n//j2
return c+(-(n+1>>1) if n&1 else n+1>>1)+(-(j>>1) if j&1 else j>>1) # Chai Wah Wu, Mar 31 2023
CROSSREFS
Cf. A309288.
Sequence in context: A352559 A127477 A104505 * A324185 A348175 A175958
KEYWORD
sign,look
AUTHOR
Seiichi Manyama, Mar 31 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 August 29 15:03 EDT 2024. Contains 375517 sequences. (Running on oeis4.)