A376926 a(n) is the number of ways n can be written as x + y with x >= y, x and y coprime, and so that the distinct prime factors of x*y*n are consecutive primes starting with 2.
0, 1, 1, 1, 1, 1, 0, 1, 2, 2, 0, 1, 0, 1, 2, 1, 0, 0, 0, 0, 3, 1, 0, 0, 4, 0, 2, 1, 0, 0, 0, 1, 1, 0, 4, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 3, 0, 0, 0, 0, 1, 4, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 1, 3, 0, 0, 0, 0, 0, 0, 1, 0, 1
Offset: 1
Keywords
Examples
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.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
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
-
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