|
|
A051034
|
|
Minimal number of primes needed to sum to n.
|
|
18
|
|
|
1, 1, 2, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 3, 2, 1, 2, 1, 2, 2, 2, 3, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 3, 2, 1, 2, 2, 2, 3, 2, 1, 2, 1, 2, 2, 2, 3, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 3, 2, 1, 2, 2, 2, 1, 2, 2, 2, 3, 2, 1, 2, 2, 2, 3, 2, 3, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
2,3
|
|
LINKS
|
Olivier Ramaré, On Šnirel'man's constant, Annali della Scuola Normale Superiore di Pisa, Classe di Scienze 4e série, 22:4 (1995), pp. 645-706.
|
|
FORMULA
|
a(n) = 1 iff n is prime. a(2n) = 2 (for n > 1) if Goldbach's conjecture is true. a(2n+1) = 2 (for n >= 1) if 2n+1 is not prime, but 2n-1 is. a(2n+1) >= 3 (for n >= 1) if both 2n+1 and 2n-1 are not primes (for sufficiently large n, a(2n+1) = 3 by Vinogradov's theorem, 1937). - Franz Vrabec, Nov 30 2004
a(n) <= 3 for all n, assuming the Goldbach conjecture. - N. J. A. Sloane, Jan 20 2007
Assuming Goldbach's conjecture, a(n) <= 3. In particular, a(p)=1; a(2*n)=2 for n>1; a(p+2)=2 provided p+2 is not prime; otherwise a(n)=3. - Sean A. Irvine, Jul 29 2019
a(2n+1) <= 3 by Helfgott's proof of Goldbach's ternary conjecture, and hence a(n) <= 4 in general. - Charles R Greathouse IV, Oct 24 2022
|
|
EXAMPLE
|
a(2) = 1 because 2 is already prime.
a(4) = 2 because 4 = 2+2 is a partition of 4 into 2 prime parts and there is no such partition with fewer terms.
a(27) = 3 because 27 = 3+5+19 is a partition of 27 into 3 prime parts and there is no such partition with fewer terms.
|
|
MATHEMATICA
|
(* Assuming Goldbach's conjecture *) a[p_?PrimeQ] = 1; a[n_] := If[ Reduce[ n == x + y, {x, y}, Primes] === False, 3, 2]; Table[a[n], {n, 2, 112}] (* Jean-François Alcover, Apr 03 2012 *)
|
|
PROG
|
(PARI) issum(n, k)=if(k==1, isprime(n), k--; forprime(p=2, n, if(issum(n-p, k), return(1))); 0)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,nice
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|