OFFSET
0,76
COMMENTS
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..50000
Victor Ufnarovski and Bo Ahlander, How to Differentiate a Number, J. Integer Seqs., Vol. 6, 2003.
FORMULA
EXAMPLE
a(27) = 1 as 27 can be expressed in exactly one way in the form (p*q + p*r + q*r), with p, q, r all being 3 in this case, as 27 = (3*3 + 3*3 + 3*3).
a(311) = 5 as 311 = (3*5 + 3*37 + 5*37) = (3*7 + 3*29 + 7*29) = (3*13 + 3*17 + 13*17) = (5*7 + 5*23 + 7*23) = (7*11 + 7*13 + 11*13). Expressed in the terms of arithmetic derivatives, of the A099302(311) = 8 antiderivatives of 311 [366, 430, 494, 555, 609, 663, 805, 1001], only the last five are products of three odd primes: 555 = 3*5*37, 609 = 3*7*29, 663 = 3*13*17, 805 = 5*7*23, 1001 = 7 * 11 * 13.
PROG
(PARI)
\\ Use this for building up a list up to a certain n. We iterate over weakly increasing triplets of odd primes:
A369054list(up_to) = { my(v = [3, 3, 3], ip = #v, d, u = vector(up_to)); while(1, d = ((v[1]*v[2]) + (v[1]*v[3]) + (v[2]*v[3])); if(d > up_to, ip--, ip = #v; u[d]++); if(!ip, return(u)); v[ip] = nextprime(1+v[ip]); for(i=1+ip, #v, v[i]=v[i-1])); };
v369054 = A369054list(100001);
A369054(n) = if(!n, n, v369054[n]);
(PARI)
\\ Use this for computing the value of arbitrary n. We iterate over weakly increasing pairs of odd primes:
A369054(n) = if(3!=(n%4), 0, my(v = [3, 3], ip = #v, r, c=0); while(1, r = (n-(v[1]*v[2])) / (v[1]+v[2]); if(r < v[2], ip--, ip = #v; if(1==denominator(r) && isprime(r), c++)); if(!ip, return(c)); v[ip] = nextprime(1+v[ip]); for(i=1+ip, #v, v[i]=v[i-1])));
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jan 20 2024
STATUS
approved