A125689 a(n) is the smallest number having exactly n partitions into three distinct primes.
1, 10, 18, 26, 31, 35, 39, 80, 49, 47, 57, 53, 63, 59, 65, 67, 248, 73, 71, 79, 85, 77, 93, 105, 332, 83, 89, 111, 97, 482, 95, 103, 101, 674, 135, 129, 115, 107, 800, 113, 1040, 121, 1010, 119, 127, 125, 153, 159, 133, 1136, 145, 131, 171, 1304, 137, 151, 1520
Offset: 0
Keywords
Links
- Andrew Howroyd, Table of n, a(n) for n = 0..1000
Crossrefs
Cf. A125688.
Programs
-
Mathematica
nmax = 300; kmax = 10000; c = ConstantArray[Null, nmax]; For[k = 1, k <= kmax, k++, l = Length@Select[IntegerPartitions[k, {3}, Prime@Range@kmax], #[[1]] > #[[2]] > #[[3]] &]; If[l <= nmax && c[[l]] == Null, c[[l]] = k]; ]; Prepend[c[[1 ;; First@FirstPosition[c, Null] - 1]], 1] (* Robert Price, Apr 25 2025 *)
-
PARI
\\ here b(n) is A125688. b(n, brk=oo)={my(s=0); forprime(p=2, n\3, if((n-p)%2==0, forprime(q=p+1, (n-p)/2-1, if(isprime(n-p-q), s++; if(s>=brk, return(-1))) ))); s} sols(n, lim, f)={my(u=vector(n), r=n); for(i=1, lim, my(t=f(i)); if(t>0 && t<=#u && !u[t], u[t]=i; r--; if(r==0, return(u)))); my(m=1); while(m<=#u && u[m], m++); u[1..m-1]} { my(nn=100); nn++; sols(nn, 10^4, i->b(i, nn)+1) } \\ Andrew Howroyd, Jan 06 2020
Extensions
Terms a(40) and beyond from Andrew Howroyd, Jan 06 2020
Comments