Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #22 Feb 13 2018 00:24:22
%S 0,0,0,0,0,0,0,1,0,1,2,2,2,3,3,4,4,5,5,6,6,6,6,9,8,8,11,11,10,13,13,
%T 12,14,15,13,18,17,14,21,19,17,25,20,21,26,25,22,30,28,21,32,31,23,37,
%U 32,27,39,36,32,43,41,36,45,44,35,51,48,34,54,48,36,59,50,43,60,55,46,61
%N Number of ways of writing 2n+1 as p+q+r where p,q,r are primes with p < q < r, offset=0.
%C The graph of this function shows two main branches, each with further subdivisions. It seems that the main branches result from the fact that values a(3k+1) are in the mean roughly 30% lower than values a(3k) and a(3k+2). This can be explained by the fact that the sum of 3 primes (with equal probability of being congruent to 1 or to 5 mod 6) is congruent to 3 (mod 6) in only 2 out of 8 cases, and congruent to 1 or to 5 (mod 6) in 3 out of 8 cases, for each of these two residues. Analyzing the frequencies of the possible residues mod 30 explains the further sub-branches: A sum of 3 primes is congruent to 1, 3, ..., 29 (mod 30) in (42, 29, 33, 39, 29, 36, 36, 30, 39, 30, 39, 30, 36, 37, 27) out of 512 cases. - _M. F. Hasler_, Oct 27 2017
%H Alois P. Heinz, <a href="/A102605/b102605.txt">Table of n, a(n) for n = 0..10000</a>
%e a(19) = 6 because 2*19+1 = 39 and 39 = 3+5+31 = 3+7+29 = 3+13+23 = 3+17+19 = 5+11+23 = 7+13+19.
%o (PARI) A102605(n,s=0)={forprime(p=1,(n*=2)\3,my(d=n-p);forprime(q=p+1,d\2,isprime(d+1-q)&&s++));s} \\ _M. F. Hasler_, Oct 27 2017
%Y Number of ways of writing 2n+1 as p+q+r where p, q, r are primes with p <= q <= r gives A054860.
%Y Bisection of A125688 (odd part). - _Alois P. Heinz_, Nov 14 2012
%K nonn,look
%O 0,11
%A _Zak Seidov_, Jan 29 2005