A318807 Numbers whose sum of squarefree divisors and sum of nonsquarefree divisors are both perfect squares.
1, 3, 9, 22, 27, 66, 70, 88, 94, 115, 119, 170, 198, 210, 214, 217, 264, 265, 280, 282, 310, 322, 345, 357, 376, 382, 385, 497, 510, 517, 527, 594, 630, 642, 651, 679, 680, 710, 729, 742, 745, 782, 795, 840, 846, 856, 862, 889, 930, 935, 966, 970, 1035, 1066
Offset: 1
Keywords
Examples
27 is in the sequence because A048250(27) = 4 and A162296(27) = 36 are both a perfect square.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
Maple
filter:= proc(n) local F, SF, NSF, t; F:= ifactors(n)[2]; SF:= mul(1+t[1],t=F); if not issqr(SF) then return false fi; NSF:= mul((1-t[1]^(1+t[2]))/(1-t[1]), t=F) - SF; issqr(NSF); end proc: select(filter, [$1..2000]); # Robert Israel, Sep 05 2018
-
Mathematica
lst={};Do[If[IntegerQ[Sqrt[Total[Select[Divisors[n],SquareFreeQ]]]]&&IntegerQ[Sqrt[DivisorSigma[1,n]-Total[Select[Divisors[n],SquareFreeQ]]]],AppendTo[lst,n]],{n,1100}];lst sdsndQ[n_]:=Module[{d=Divisors[n],sf,nsf},sf=Select[d,SquareFreeQ];nsf= Complement[ d,sf];AllTrue[ {Sqrt[ Total[sf]],Sqrt[ Total[nsf]]},IntegerQ]]; Select[Range[1500],sdsndQ] (* Harvey P. Dale, Sep 13 2024 *)
-
PARI
isok(n) = {my(sd=sumdiv(n, d, issquarefree(d)*d)); issquare(sd) && issquare(sigma(n) - sd);} \\ Michel Marcus, Sep 04 2018
Extensions
Definition modified by Harvey P. Dale, Sep 13 2024
Comments