OFFSET
1,3
LINKS
FORMULA
PROG
(Scheme) (define (A290099 n) (cond ((= 1 n) n) ((even? n) (- (A290099 (/ n 2)))) (else (* (A000040 (+ -1 (A055396 n))) (A290099 (A032742 n))))))
(Python)
from sympy import factorint, prevprime
from operator import mul
from functools import reduce
def a(n): return 1 if n==1 else reduce(mul, [(-1)**e if p==2 else prevprime(p)**e for p, e in factorint(n).items()])
print([a(n) for n in range(1, 61)]) # Indranil Ghosh, Aug 08 2017
CROSSREFS
KEYWORD
sign,mult
AUTHOR
Antti Karttunen, Aug 08 2017
STATUS
approved