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!)
A367175 a(n) = Sum_{d|n} (-1)^[d is prime] * d, where [] denotes the Iverson bracket. 2
1, -1, -2, 3, -4, 2, -6, 11, 7, 4, -10, 18, -12, 6, 8, 27, -16, 29, -18, 28, 12, 10, -22, 50, 21, 12, 34, 38, -28, 52, -30, 59, 20, 16, 24, 81, -36, 18, 24, 76, -40, 72, -42, 58, 62, 22, -46, 114, 43, 79, 32, 68, -52, 110, 40, 102, 36, 28, -58, 148, -60, 30 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
FORMULA
{k: a(k) < 0} = {A000040}.
{k: a(k) > k} = {A033942}.
{k: a(k) < k} = {A037143} \ {1}.
sigma(n) - a(n) = 2 * A008472(n).
Conjecture: {k: a(k) divides sigma(k)} = {1, 2, 3, 6, 14, 15, 35}.
MAPLE
Isprime := n -> if isprime(n) then 1 else 0 fi:
a := n -> local d; add((-1)^Isprime(d) * d, d in NumberTheory:-Divisors(n)):
seq(a(n), n = 1..62);
MATHEMATICA
Array[DivisorSum[#, (-1)^Boole[PrimeQ[#]]*# &] &, 62] (* Michael De Vlieger, Nov 10 2023 *)
PROG
(SageMath)
def A367175(n): return sum((-1)^is_prime(d)*d for d in divisors(n))
print([A367175(n) for n in range(1, 63)])
(PARI) a(n) = sumdiv(n, d, (-1)^isprime(d)*d); \\ Michel Marcus, Nov 10 2023
(Python)
from sympy import divisor_sigma, primefactors
def A367175(n): return divisor_sigma(n)-(sum(primefactors(n))<<1) # Chai Wah Wu, Nov 10 2023
CROSSREFS
Sequence in context: A047994 A193024 A340368 * A153038 A368698 A324911
KEYWORD
sign
AUTHOR
Peter Luschny, Nov 08 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 April 28 09:05 EDT 2024. Contains 372020 sequences. (Running on oeis4.)