login
A241922
Smallest k^2>=0 such that n-k^2 is semiprime, or a(n)=2 if there is no such k^2.
5
2, 2, 2, 0, 1, 0, 1, 4, 0, 0, 1, 2, 4, 0, 0, 1, 2, 4, 4, 16, 0, 0, 1, 9, 0, 0, 1, 2, 4, 4, 9, 2, 0, 0, 0, 1, 4, 0, 0, 1, 16, 4, 4, 9, 36, 0, 1, 9, 0, 1, 0, 1, 4, 16, 0, 1, 0, 0, 1, 9, 4, 0, 1, 9, 0, 1, 9, 64, 0, 1, 9, 2, 4, 0, 1, 25, 0, 1, 64, 25, 4, 0, 1, 49, 0, 0, 0, 1, 4, 4, 0, 1, 0, 0, 0, 1, 4, 4, 4, 9, 16
OFFSET
1,1
COMMENTS
If n = m^2, m>=2, then the condition {a(n) differs from 2} is equivalent to the Goldbach binary conjecture. Indeed, if m^2 - k^2 is semiprime, then (m-k)*(m+k) = p*q, where p<=q are primes. Here we consider two possible cases. 1) m-k=1, m+k=p*q and 2) m-k=p, m+k=q. But in the first case k=m-1>m-p, i.e., more than k in the second case. In view of the minimality k, we only have to consider case 2). In this case we have m-/+k both are primes p<=q (with equality in case k=0) and thus 2*m = p + q. Conversely, let the Goldbach conjecture be true. Then for a perfect square n>=4, we have 2*sqrt(n)=p+q (p<=q are both primes). Thus n=((p+q)/2)^2 and n-((p-q)/2)^2=p*q is semiprime. Hence a(n) is a square not exceeding ((p-q)/2)^2.
Note that a(n)=2 for 1,2,3,12,17,28,32,72,...
All these numbers are in A100570. Thus the Goldbach binary conjecture is true if and only if A100570 does not contain perfect squares.
The largest term found in the first 2^28 terms is a(106956964) = 369^2 = 136161. This further encourages one to believe that Goldbach's binary conjecture holds true. - Daniel Mikhail, Nov 23 2020
FORMULA
a(A001358(n)) = 0.
PROG
(PARI) a(n) = {my(lim = if (issquare(n), sqrtint(n)-1, sqrtint(n))); for (k=0, lim, if (bigomega(n-k^2) == 2, return (k^2)); ); return (2); } \\ Michel Marcus, Nov 26 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Shevelev, May 01 2014
STATUS
approved