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!)
A340901 Additive with a(p^e) = (-p)^e. 1
0, -2, -3, 4, -5, -5, -7, -8, 9, -7, -11, 1, -13, -9, -8, 16, -17, 7, -19, -1, -10, -13, -23, -11, 25, -15, -27, -3, -29, -10, -31, -32, -14, -19, -12, 13, -37, -21, -16, -13, -41, -12, -43, -7, 4, -25, -47, 13, 49, 23, -20, -9, -53, -29, -16, -15, -22, -31 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
The sequence contains every integer infinitely many times.
Proof (outline):
1. Every integer m > 9 is the sum of distinct odd primes [R. E. Dressler].
2. Any integer k (positive as negative) can be written as k = 4^e - m, for sufficiently large and infinitely many e > 0 and m > 9.
3. Pick an arbitrary integer k and write it like k = 4^e - m. Let p_1, p_2, ..., p_i be distinct odd primes such that p_1 + p_2 + ... + p_i = m. Then a(p_1*p_2*...*p_i*4^e) = 4^e - m = k. Since there are infinitely many representations of any k of the form 4^e - m, this means that there are infinitely many n such that a(n) = k.
Q.E.D.
LINKS
R. E. Dressler, A stronger Bertrand's postulate with an application to partitions, Proc. Amer. Math. Soc., 33 (1972), 226-228.
FORMULA
a(A002035(n)) = - A008475(A002035(n)).
a(n^2) = A008475(n^2).
EXAMPLE
a(20) = a(2^2*5) = (-2)^2 + (-5) = -1.
MATHEMATICA
a[n_] := Total@ (((-First[#])^Last[#]) & /@ FactorInteger[n]); a[1] = 0; Array[a, 100] (* Amiram Eldar, May 15 2023 *)
PROG
(Python)
from sympy import primefactors as pf, multiplicity as mult
def a(n):
return sum([(-p)**mult(p, n) for p in pf(n)])
for n in range(1, 59):
print(a(n), end=', ')
(PARI) a(n) = my(f=factor(n)); sum(k=1, #f~, (-f[k, 1])^f[k, 2]); \\ Michel Marcus, Jan 26 2021
(APL, Dyalog dialect) A340901 ← {1=⍵:0 ⋄ +/{(-⍺)*≢⍵}⌸factors(⍵)} ⍝ Needs also factors function from https://dfns.dyalog.com/c_factors.htm - Antti Karttunen, Feb 16 2024
CROSSREFS
Sequence in context: A354547 A130044 A156229 * A082081 A008475 A222416
KEYWORD
sign
AUTHOR
Sebastian Karlsson, Jan 26 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 August 17 02:18 EDT 2024. Contains 375198 sequences. (Running on oeis4.)