OFFSET
1,1
COMMENTS
All numbers that are each the square of a composite are included in the sequence. All numbers that are the square of a prime are excluded from the sequence.
A prime power p^h is included if and only if h >= 4. - Robert Israel, Jun 21 2018
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
The divisors of 80 are 1,2,4,5,8,10,16,20,40,80. The middle two divisors are 8 and 10, which are both composite. So 80 is included in the sequence.
MAPLE
filter:= proc(n) local dp, dm;
if issqr(n) then return not isprime(sqrt(n)) fi;
dm, dp:= selectremove(t -> t^2 < n, numtheory:-divisors(n));
not isprime(max(dm)) and not isprime(min(dp));
end proc:
select(filter, [$2..1000]); # Robert Israel, Jun 21 2018
MATHEMATICA
fQ[n_] := Block[{m = DivisorSigma[0, n]}, Union@ PrimeQ@ Take[ Divisors@ n, {Floor[(m + 1)/2], Ceiling[(m + 1)/2]}] == {False}]; Select[ Range[2, 363], fQ@# &] (* Robert G. Wilson v, May 31 2008 *)
cdQ[n_]:=Module[{d=Divisors[n], a, b}, a=Select[d, #<=Sqrt[n]&][[-1]]; b= Select[ d, #>=Sqrt[n]&][[1]]; AllTrue[{a, b}, CompositeQ]]; Select[ Range[ 400], cdQ] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Mar 17 2019 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, May 29 2008
EXTENSIONS
More terms from Robert G. Wilson v, May 31 2008
STATUS
approved