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!)
A345300 a(n) is the number of distinct primes of the form n + A - B where A and B are sums of subsets of the prime factors of n. 2
0, 1, 1, 1, 1, 4, 1, 0, 0, 5, 1, 4, 1, 4, 4, 0, 1, 4, 1, 3, 3, 3, 1, 3, 0, 4, 0, 3, 1, 4, 1, 0, 3, 3, 3, 3, 1, 3, 2, 3, 1, 4, 1, 2, 4, 3, 1, 3, 0, 3, 3, 3, 1, 2, 2, 2, 3, 3, 1, 4, 1, 2, 4, 0, 3, 5, 1, 2, 2, 4, 1, 3, 1, 3, 3, 2, 2, 5, 1, 2, 0, 2, 1, 3, 3, 4, 2, 3, 1, 3, 2, 3, 2, 2, 2, 2, 1, 3, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,6
COMMENTS
If n is prime, a(n) = 1.
If n is a prime power other than 4, a(n) = 0.
LINKS
EXAMPLE
a(6) = 4 because there are four such primes: 3 = 6-3, 5 = 6+2-3, 7 = 6+3-2, and 11=6+2+3.
MAPLE
f:= proc(n) local S, p;
S:= {n};
for p in numtheory:-factorset(n) do
S:= S union map(`+`, S, p) union map(`-`, S, p)
od:
nops(select(isprime, S))
end proc:
map(f, [$1..1000]);
CROSSREFS
Cf. A345316.
Sequence in context: A221971 A297785 A334702 * A085992 A117411 A161739
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Jun 13 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 April 28 09:58 EDT 2024. Contains 372037 sequences. (Running on oeis4.)