cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A102605 Number of ways of writing 2n+1 as p+q+r where p,q,r are primes with p < q < r, offset=0.

Original entry on oeis.org

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, 12, 14, 15, 13, 18, 17, 14, 21, 19, 17, 25, 20, 21, 26, 25, 22, 30, 28, 21, 32, 31, 23, 37, 32, 27, 39, 36, 32, 43, 41, 36, 45, 44, 35, 51, 48, 34, 54, 48, 36, 59, 50, 43, 60, 55, 46, 61
Offset: 0

Views

Author

Zak Seidov, Jan 29 2005

Keywords

Comments

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

Examples

			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.
		

Crossrefs

Number of ways of writing 2n+1 as p+q+r where p, q, r are primes with p <= q <= r gives A054860.
Bisection of A125688 (odd part). - Alois P. Heinz, Nov 14 2012

Programs

  • 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