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!)
A338770 a(n) is the sum of primes of the form n - 2*p for primes p < n/2. 2

%I #11 Nov 08 2020 23:04:39

%S 0,0,0,0,0,2,3,2,8,0,12,2,10,0,16,2,34,0,18,0,35,0,49,2,33,0,58,2,52,

%T 0,22,0,89,0,73,2,68,0,64,2,97,0,88,0,132,0,134,2,80,0,189,0,147,0,87,

%U 0,227,0,103,2,73,0,241,2,223,0,189,0,221,0,178,0,184,0,322,2,307,0,189,0,336,0

%N a(n) is the sum of primes of the form n - 2*p for primes p < n/2.

%C If n is even then a(n)=2*A010051(n/2-1).

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

%e The representations of 31 as 2*p+q with p and q prime are 2*7+17 and 2*13+5, so a(31) = 17 + 5 = 22.

%p f:= proc(n) local q,v,t;

%p t:= 0; q:= 1;

%p do

%p q:= nextprime(q);

%p if 2*q > n then return t fi;

%p v:= n - 2*q;

%p if isprime(v) then t:= t+v fi;

%p od;

%p end proc:

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

%o (PARI) a(n) = my(s=0); forprime(p=0, n\2, if (isprime(q=n-2*p), s+=q)); s; \\ _Michel Marcus_, Nov 08 2020

%Y Cf. A010051.

%K nonn,look

%O 1,6

%A _J. M. Bergot_ and _Robert Israel_, Nov 08 2020

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 25 08:27 EDT 2024. Contains 371964 sequences. (Running on oeis4.)