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!)
A367176 Numbers k, such that (Sum_{d|k} (-1)^[d is prime] * d) is prime. 1
4, 6, 8, 9, 18, 32, 49, 50, 128, 162, 169, 242, 288, 400, 512, 578, 729, 900, 1058, 1156, 1521, 1600, 1682, 2048, 2116, 2312, 2450, 3025, 3249, 3600, 3872, 4356, 4418, 4489, 4624, 5000, 6241, 6728, 6962, 7225, 8100, 8281, 8450, 8464, 8649, 8712, 10000 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
FORMULA
k is a term if and only if A367175(k) is prime.
MAPLE
select(n -> isprime(A367175(n)), [seq(1..10000)]);
MATHEMATICA
Select[Range[10000], And[# > 1, PrimeQ[#]] &@ DivisorSum[#, (-1)^Boole[PrimeQ[#]]*# &] &] (* Michael De Vlieger, Nov 10 2023 *)
PROG
(SageMath)
def is_a(n): return is_prime(sum((-1)^is_prime(d)*d for d in divisors(n)))
print([n for n in range(1, 10001) if is_a(n)])
(PARI) isok(k) = isprime(sumdiv(k, d, (-1)^isprime(d)*d)); \\ Michel Marcus, Nov 10 2023
(Python)
from itertools import count, islice
from sympy import divisor_sigma, primefactors
def A367176_gen(startvalue=2): # generator of terms >= startvalue
return filter(lambda n: isprime(divisor_sigma(n)-(sum(primefactors(n))<<1)), count(max(startvalue, 2)))
A367176_list = list(islice(A367176_gen(), 20)) # Chai Wah Wu, Nov 10 2023
CROSSREFS
Sequence in context: A123710 A075243 A024370 * A121719 A267509 A162738
KEYWORD
nonn
AUTHOR
Peter Luschny, Nov 10 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 13 14:08 EDT 2024. Contains 372519 sequences. (Running on oeis4.)