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

%I #10 Jun 15 2021 09:54:19

%S 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,

%T 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,

%U 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

%N 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.

%C If n is prime, a(n) = 1.

%C If n is a prime power other than 4, a(n) = 0.

%H Robert Israel, <a href="/A345300/b345300.txt">Table of n, a(n) for n = 1..10000</a>

%e 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.

%p f:= proc(n) local S, p;

%p S:= {n};

%p for p in numtheory:-factorset(n) do

%p S:= S union map(`+`,S,p) union map(`-`,S,p)

%p od:

%p nops(select(isprime,S))

%p end proc:

%p map(f, [$1..1000]);

%Y Cf. A345316.

%K nonn

%O 1,6

%A _J. M. Bergot_ and _Robert Israel_, Jun 13 2021

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 24 21:46 EDT 2024. Contains 375417 sequences. (Running on oeis4.)