The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A288574 Total number of distinct primes in all representations of 2*n+1 as a sum of 3 odd primes. 3
 0, 0, 0, 0, 1, 2, 4, 4, 6, 7, 9, 10, 12, 15, 17, 16, 19, 19, 23, 25, 26, 26, 28, 33, 32, 35, 43, 39, 41, 45, 45, 48, 54, 55, 52, 60, 59, 56, 75, 67, 67, 81, 74, 76, 92, 83, 85, 100, 96, 81, 106, 103, 91, 121, 108, 98, 131, 120, 116, 143, 133, 129, 151, 144, 124, 163 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,6 COMMENTS That is, a representation 2n+1 = p+p+p counts as 1, as p+p+q counts as 2, and p+q+r counts as 3. If each representation is counted once, we simply get A007963. LINKS Indranil Ghosh (first 200 terms), Hugo Pfoertner, Table of n, a(n) for n = 0..10000 MAPLE A288574 := proc(n)     local a, i, j, k, p, q, r, pqr ;     a := 0 ;     for i from 2 do         p := ithprime(i) ;         for j from i do             q := ithprime(j) ;             for k from j do                 r := ithprime(k) ;                 if p+q+r = 2*n+1 then                     pqr := {p, q, r} ;                     a := a+nops(pqr) ;                 elif p+q+r > 2*n+1 then                     break;                 end if;             end do:             if p+2*q > 2*n+1 then                 break;             end if;         end do:         if 3*p > 2*n+1 then             break;         end if;     end do:     return a; end proc: seq(A288574(n), n=0..80) ; # R. J. Mathar, Jun 29 2017 PROG (PARI) a(n)={my(p, q, r, cnt); n=2*n+1; forprime(p=3, n\3, forprime(q=p, (n-p)\2, if(isprime(r=n-p-q), cnt+=if(p===q&&p==r, 1, if(p==q||q==r, 2, 3))))); cnt} \\ Franklin T. Adams-Watters, Jun 28 2017 (Python) from sympy import primerange, isprime, floor def a(n):     n=2*n + 1     c=0     for p in primerange(3, floor(n/3) + 1):         for q in primerange(p, floor((n - p)/2) + 1):             r=n - p - q             if isprime(r): c+=1 if p==q and p==r else 2 if p==q or q==r else 3     return c print [a(n) for n in range(0, 66)] # Indranil Ghosh, Jun 29 2017 CROSSREFS A288573 appears to be an erroneous version of this sequence. Cf. A007963, A054860, A087916. Sequence in context: A026413 A038669 A288573 * A135692 A089003 A132118 Adjacent sequences:  A288571 A288572 A288573 * A288575 A288576 A288577 KEYWORD nonn AUTHOR Franklin T. Adams-Watters and R. J. Mathar, Jun 28 2017 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified March 30 09:41 EDT 2020. Contains 333125 sequences. (Running on oeis4.)