

A166401


Positive integers n where (the largest divisor of n that is <= sqrt(n)) divides (the smallest divisor of n that is >= sqrt(n)).


3



1, 2, 3, 4, 5, 7, 8, 9, 11, 13, 16, 17, 18, 19, 23, 25, 27, 29, 31, 32, 36, 37, 41, 43, 47, 49, 50, 53, 59, 61, 64, 67, 71, 73, 75, 79, 81, 83, 89, 97, 98, 100, 101, 103, 107, 109, 113, 121, 125, 127, 128, 131, 137, 139, 144, 147, 149, 151, 157, 162, 163, 167, 169, 173
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

This sequence contains all the primes and prime powers. For those terms that are composite, see A166402. For those terms that are not powers of primes, see A166403.
Also, the sequence contains all the positive squares.  Ivan Neretin, Jan 12 2016


LINKS

Ivan Neretin, Table of n, a(n) for n = 1..10000


EXAMPLE

The divisors of 50 are 1,2,5,10,25,50. The middle two divisors are 5 and 10. Since 5 divides 10, then 50 is in this sequence.


MAPLE

filter:= proc(n) local a, b;
if issqr(n) then return true fi;
a, b:= selectremove(t > (t^2 <= n), numtheory:divisors(n));
min(b) mod max(a) = 0
end proc:
select(filter, [$1..1000]); # Robert Israel, Jan 13 2016


MATHEMATICA

Select[Range[174], Divisible[(d = Divisors[#])[[n = Floor[Length[d]/2 + 1]]], d[[n]]] &] (* Ivan Neretin, Jan 12 2016 *)


PROG

(PARI) isok(n) = my(d = divisors(n), ld = if(n<2, 1, d[(length(d)+1)\2]), sd = d[length(d)\2+1]); sd % ld == 0; \\ adapted from A033676 & A033677; Michel Marcus, Jan 13 2016


CROSSREFS

Cf. A033676, A033677.
Cf. A166402, A166403.
Sequence in context: A087092 A046684 A082377 * A329131 A133811 A316525
Adjacent sequences: A166398 A166399 A166400 * A166402 A166403 A166404


KEYWORD

nonn


AUTHOR

Leroy Quet, Oct 13 2009


EXTENSIONS

More terms from Max Alekseyev, Feb 23 2010


STATUS

approved



