OFFSET
1,1
COMMENTS
Related to Heron triangles with a partition point on one of the sides. Calculations become quite different when the partition a + b = m gives the perfect square k^2 = a*b.
These numbers coincide with the numbers > 1 not in A004614.
Let m = 2^t * p_1^a_1 * p_2^a_2 * ... * p_r^a_r * q_1^b_1 * q_2^b_2 * ... * q_s^b_s with t >= 0, a_i >= 0 for i=1..r, where p_i == 1 (mod 4) for i=1..r and q_j == -1 (mod 4) for j=1..s.
Even numbers (A005843) belong to this sequence: m = 2*k and p = k^2.
Numbers divisible by a prime q congruent to 1 (mod 4) (cf. A004613) belong to this sequence: m = q * m_1 = (u^2 + v^2) * m_1 and p = (u*v*q)^2.
The other numbers are divisible only by primes congruent to 3 (mod 4) (cf. A004614).
EXAMPLE
Even numbers m = 2*k give a = b = k. For example, 94 = 47+47 and k^2 = 47^2.
Numbers which are divisible by a prime q congruent to 1 (mod 4) give m = q*m' = (u^2 + v^2)*m' and p = (u*v*m')^2. For example, 87 = 3*29 = 3*(25 + 4) = (5*4*3)^2 = 60^2.
MATHEMATICA
Select[Range[100], Length @ Select[Times @@@ IntegerPartitions[#, {2}], IntegerQ @ Sqrt[#1] &] > 0 &] (* Amiram Eldar, Aug 26 2020 *)
PROG
(PARI) upto(n) = { my(res = List(vector(n\2, i, 2*i))); forstep(i = 1, n, 2, c = core(i); for(k = 1, sqrtint((n-i)\c), listput(res, i + c*k^2); ) ); listsort(res, 1); res } \\ David A. Corneth, Aug 26 2020
(PARI) is(n) = for(i = 1, n\2 + 1, if(issquare(i * (n-i)), return(n>1))); 0 \\ David A. Corneth, Aug 26 2020
(Python)
from itertools import count, islice
from sympy import primefactors
def A337140_gen(startvalue=2): # generator of terms >= startvalue
return filter(lambda n: n&1^1 or not all(p&2 for p in primefactors(n>>(~n & n-1).bit_length())), count(max(startvalue, 2)))
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Hein van Winkel, Aug 18 2020
STATUS
approved