login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A238403 Number of ways a number can be decomposed as a sum of the form pq + qr + rp where p < q < r are distinct primes. 2
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,71
COMMENTS
The average value of a(n) is >> sqrt(n)/log^3 n. - Charles R Greathouse IV, Feb 26 2014
LINKS
Jean-François Alcover, Table of n, a(n) for n = 1..1000
EXAMPLE
71 = 3*5 + 5*7 + 7*3 = 2*3 + 3*13 + 13*2, therefore a(71) = 2.
MATHEMATICA
r[n_, p_] := Reduce[p < q < r && p*q+q*r+r*p == n, {q, r}, Primes]; a[n_] := (For[cnt = 0; p = 2, p <= Ceiling[(n-6)/5], p = NextPrime[p], rnp = r[n, p]; If[rnp =!= False, Which[rnp[[0]] === And, Print["n = ", n, " ", {p, q, r} /. ToRules[rnp]]; cnt++, rnp[[0]] === Or, Print["n = ", n, " ", {p, q, r} /. {ToRules[rnp]}]; cnt += Length[rnp], True, Print["error: n = ", n, " ", rnp]]]]; cnt); Table[a[n], {n, 1, 100}]
PROG
(PARI) list(n)=my(v=vector(n)); forprime(r=5, (n-6)\5, forprime(q=3, min((n-2*r)\(r+2), r-2), my(S=q+r, P=q*r); forprime(p=2, min((n-P)\S, q-1), v[p*S+P]++))); v \\ Charles R Greathouse IV, Feb 26 2014
(PARI) a(n)=my(s); forprime(r=(sqrtint(3*n-3)+5)\3, (n-6)\5, forprime(q= sqrtint(r^2+n)-r+1, min((n-2*r)\(r+2), r-2), if((n-q*r)%(q+r)==0 && isprime((n-q*r)/(q+r)), s++))); s \\ Charles R Greathouse IV, Feb 26 2014
CROSSREFS
Sequence in context: A281669 A331845 A014083 * A112315 A295663 A005926
KEYWORD
nonn
AUTHOR
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 22:18 EDT 2024. Contains 371782 sequences. (Running on oeis4.)