login
This site is supported by donations to The OEIS Foundation.

 

Logo

Many excellent designs for a new banner were submitted. We will use the best of them in rotation.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A059998 Number of different primes occurring when n is expressed as p1+q1+r1 = ... = pk+qk+rk where pk,qk,rk are primes with pk <= qk <= rk. 3
0, 0, 0, 0, 0, 1, 2, 2, 3, 3, 4, 4, 3, 3, 5, 4, 6, 5, 5, 5, 7, 5, 8, 6, 7, 7, 9, 6, 8, 5, 8, 7, 10, 5, 11, 8, 10, 9, 10, 4, 12, 7, 11, 9, 13, 7, 14, 8, 13, 11, 15, 9, 14, 7, 14, 11, 16, 7, 15, 8, 15, 13, 17, 6, 18, 11, 17, 13, 17, 5, 19, 11, 18, 13, 20, 10, 21, 11, 20, 15, 20, 9, 22, 10, 21 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,7

COMMENTS

Goldbach conjectured that every integer >5 is the sum of three primes. 6=2+2+2, 7=2+2+3, 8=2+3+3, 9=3+3+3=2+2+5,......

The largest possible value of a(n) is PrimePi(n)-1, which is frequently attained. - T. D. Noe, May 05 2008

LINKS

T. D. Noe, Table of n, a(n) for n = 1..2000

FORMULA

If n is of the form 2*(prime + 1) then a(n) is an even number.

EXAMPLE

n=9: 9 = 3+3+3 = 2+2+5, we can see 3 different primes. so a(9) = 3.

MATHEMATICA

a[n_] := Select[ Reverse /@ IntegerPartitions[n, {3}] , LessEqual @@ # && PrimeQ[#[[1]]] && PrimeQ[#[[2]]] && PrimeQ[#[[3]]] &] // Flatten // Union // Length; Table[a[n], {n, 1, 85}] (* Jean-Fran├žois Alcover, Oct 03 2012 *)

PROG

(PARI) a(n)=my(v=List()); forprime(r=(n+2)\3, n-4, forprime(q=(n-r+1)\2, n-r-2, if(isprime(n-r-q), listput(v, r); listput(v, q); listput(v, n-r-q)))); #vecsort(Vec(v), , 8) \\ Charles R Greathouse IV, Jul 14 2013

CROSSREFS

Sequence in context: A084054 A106747 A083447 * A234475 A036041 A085654

Adjacent sequences:  A059995 A059996 A059997 * A059999 A060000 A060001

KEYWORD

easy,nonn,nice

AUTHOR

Naohiro Nomoto, Mar 10 2001

STATUS

approved

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

Content is available under The OEIS End-User License Agreement .

Last modified April 17 07:00 EDT 2014. Contains 240634 sequences.