A381054 a(n) is the least k such that floor(sqrt(n*k/d(n*k))) - floor(sqrt(d(n*k))) = 1, where d(k) is the largest divisor of k which is <= sqrt(k).
5, 4, 4, 2, 1, 2, 1, 1, 2, 1, 4, 1, 4, 1, 1, 5, 9, 1, 9, 3, 1, 2, 9, 3, 2, 2, 2, 3, 16, 2, 16, 3, 2, 5, 2, 2, 25, 5, 2, 2, 25, 2, 25, 1, 1, 5, 25, 2, 2, 1, 3, 1, 36, 1, 1, 2, 3, 8, 36, 1, 36, 8, 1, 3, 1, 1, 49, 3, 3, 1, 49, 1, 49, 13, 1, 3, 1, 1, 49, 1
Offset: 1
Examples
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)=5 since C(k) > 1 for k=1 to 4 and C(5)=1 a(2)=4 since C(2*k) > 1 for k=1 to 3 and C(2*4)=1 a(3)=4 since C(3*k) > 1 for k=1 to 3 and C(3*4)=1 a(13*113)=7 because the first multiples of the prime factors which are exactly one square apart are 7*13 and 113. a(13*114)=3 because from the pairs of conjugate divisors which are (1,1482), (2,741), (3,494), (6,247), (13,114), (19,78),(26,57) and (38,39) the first pair that have multiples exactly one square apart is (26,57) and these multiples are (3*26,57) and 57 is the largest divisor of 3*13*114 <= sqrt(3*13*114)
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
Maple
d:= proc(n) max(select(t -> t^2 <= n, numtheory:-divisors(n))) end proc: f:= proc(n) local k,t; for k from 1 do t:= d(n*k); if floor(sqrt(n*k/t)) - floor(sqrt(t)) = 1 then return k fi od end proc: map(f, [$1..100]); # Robert Israel, Jun 04 2025
-
PARI
d(n) = if(n<2, 1, my(d=divisors(n)); d[(length(d)+1)\2]); \\ A033676 a(n) = my(k=1,dnk=d(n*k)); while (sqrtint(n*k/dnk) - sqrtint(dnk) != 1, k++;dnk=d(n*k)); k;
Comments