OFFSET
1,9
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
The a(25) = 4 solutions are:
24 + 1 = 25 and 24 * 1 * 25 = 2^3 * 3 * 5^2;
21 + 4 = 25 and 21 * 4 * 25 = 2^2 * 3 * 5^2 * 7;
18 + 7 = 25 and 18 * 7 * 25 = 2 * 3^2 * 5^2 * 7;
16 + 9 = 25 and 16 * 9 * 25 = 2^4 * 3^2 * 5^2.
The a(27) = 2 solutions are:
25 + 2 = 27 and 25 * 2 * 27 = 2 * 3^3 * 5^2;
20 + 7 = 27 and 20 * 7 * 27 = 2^2 * 3^3 * 5 * 7.
MAPLE
f:= proc(n) local t, x, y, Pn, Px, Py, L;
t:= 0:
Pn:= numtheory:-factorset(n);
for y from 1 to n/2 do
x:= n-y;
if igcd(x, y) > 1 then next fi;
L:= Pn union numtheory:-factorset(x) union numtheory:-factorset(y);
if max(L) = ithprime(nops(L)) then t:= t+1 fi
od;
t
end proc:
map(f, [$0..100]); # Robert Israel, Nov 12 2024
PROG
(PARI) a(n)={sum(k=1, n\2, if(gcd(k, n-k)==1, my(f=factor(k*(n-k)*n)[, 1]~); f[#f]==prime(#f)))} \\ Andrew Howroyd, Oct 12 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhicheng Wei, Oct 10 2024
STATUS
approved