OFFSET
1,5
COMMENTS
In the case of semiprime numbers n=p*q, the sequence a(n) chooses the first two multiples of the prime factors p and q such that these multiples (say k*p, m*q) are between two consecutive squares, then a(n)=m*k.
In the case of any composite number n, for each pair of conjugate divisors (d_i, n/d_i) we choose the first two multiples say (k_i*d_i, m_i*n/d_i) which are between two consecutive squares. Then a(n) is the smallest product k_i*m_i where i runs over half the number of divisors of n (since only pairs are considered).
a(n) can also factor numbers as follow:
gcd(n,A000196(a(n)*n)+1+sqrt((A000196(a(n)*n)+1)^2-a(n)*n)) are proper divisors of n if sqrt(a(n)*n)-A000196(a(n)*n) < 1/2
Or
FORMULA
EXAMPLE
Let C(k)=floor(sqrt(k/d(k)))-floor(sqrt(d(k))), where d(k) is the largest divisor of k which is <= sqrt(k):
a(1)=a(2)=a(3)=1 since C(n)=0, for n=1,2,3.
a(4)=1 (and generally a(n^2)=1).
a(5)=4, since C(k*5) > 0 for k=1 to 3 and C(4*k)=0.
a(6)=1 since C(6)=0.
a(7)=4 since C(k*7) > 0 for k=1 to 3 and C(4*7)=0.
a(8)=2 since C(8)=1 and C(2*8)=0.
a(9)=1
a(11)=9 since C(k*11) > 0 for k=1 to 8 and C(9*11)=0.
PROG
(PARI) d(n) = if(n<2, 1, my(d=divisors(n)); d[(length(d)+1)\2]); \\ A033676
a(n) = my(k=1); while (sqrtint(n*k/d(n*k)) != sqrtint(d(n*k)), k++); k; \\ Michel Marcus, Mar 21 2025
CROSSREFS
KEYWORD
nonn
AUTHOR
Hassan Baloui, Mar 20 2025
STATUS
approved
