login
Numbers whose sum of nonunitary divisors and sum of unitary divisors are both positive squares.
5

%I #24 Jul 28 2024 12:29:03

%S 15012,124956,128412,135972,186732,219520,241812,377892,414180,420660,

%T 447876,453060,453492,497772,504036,515052,523044,528876,544212,

%U 658560,776412,826956,1009792,1020060,1135836,1191132,1425060,1467180,1511892

%N Numbers whose sum of nonunitary divisors and sum of unitary divisors are both positive squares.

%H Amiram Eldar, <a href="/A064730/b064730.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..750 from Harry J. Smith)

%t sqQ[n_] := IntegerQ[Sqrt[n]]; f1[p_, e_] := p^e + 1; f2[p_, e_] := (p^(e+1)-1)/(p-1); q[n_] := Module[{fct = FactorInteger[n], u}, If[AllTrue[fct[[;; , 2]], # == 1 &], False, u = Times @@ f1 @@@ fct; sqQ[u] && sqQ[Times @@ f2 @@@ fct - u]]]; Select[Range[10^6], q] (* _Amiram Eldar_, Jul 27 2024 *)

%o (PARI) {usigma(n, s=1, fac, i) = fac=factor(n); for(i=1,matsize(fac)[1],s=s*(1+fac[i,1]^fac[i,2])); return(s); } nu(n) = sigma(n)-usigma(n); for(n=1,10^8, if(nu(n)>0 && issquare(nu(n)) && issquare(usigma(n)), print1(n,",")))

%o (PARI) usigma(n)= { local(f,s=1); f=factor(n); for(i=1, matsize(f)[1], s*=1 + f[i, 1]^f[i, 2]); return(s) }

%o { n=0; for (m = 1, 10^9, u=usigma(m); nu=sigma(m) - u; if (nu>0 && issquare(nu) && issquare(u), write("b064730.txt", n++, " ", m); if (n==750, break)) ) } \\ _Harry J. Smith_, Sep 24 2009

%o (PARI) is(n) = {my(f = factor(n), u); if(issquarefree(f), 0, u = prod(k=1, #f~, f[k, 1]^f[k, 2]+1); issquare(u) && issquare(sigma(f) - u));} \\ _Amiram Eldar_, Jul 27 2024

%Y Cf. A034448, A048146.

%K nonn

%O 1,1

%A _Jason Earls_, Oct 17 2001